Special Action question

All discussions & material related to Command's Lua interface

Moderators: RoryAndersonCDT, michaelm75au, angster, MOD_Command

Post Reply
User avatar
Gunner98
Posts: 5998
Joined: Fri Apr 29, 2005 12:49 am
Location: The Great White North!
Contact:

Special Action question

Post by Gunner98 »

I'm pretty sure there is a Lua solution to this one.

I have a message - which players may or may not wish to view (if they have played the previous scenario there is no need). So I thought that I would put the message as an 'Action' and trigger it somehow with a 'Special Action'

I could use ScenEdit_SpecialMessage but the message I have is several paragraphs long with formatting, hyperlinks etc so its probably to complex for this function.

An option is to make an inactive Event with a trigger that checks every second (non-repeatable) that triggers the message action. The Special action would make the Event active. That does not sound very slick though, thought there would be a function that could trigger the action directly. Can't find it though.

Any thoughts?

B
Check out our novel, Northern Fury: H-Hour!: http://northernfury.us/
And our blog: http://northernfury.us/blog/post2/
Twitter: @NorthernFury94 or Facebook https://www.facebook.com/northernfury/
Kushan04
Posts: 1239
Joined: Tue Jun 28, 2005 9:27 pm
Location: USA
Contact:

RE: Special Action question

Post by Kushan04 »

I would just make the special action that activated (or inactivate) an event that sole purpose is to display the message at the appropriate time. If the event is active/inactive at the start is dependent on what you want the default to be.
KnightHawk75
Posts: 1850
Joined: Thu Nov 15, 2018 7:24 pm

RE: Special Action question

Post by KnightHawk75 »

thought there would be a function that could trigger the action directly. Can't find it though.

If I understand right you may be looking for ScenEdit_ExecuteEventAction() if you want to execute a already existing Action.
User avatar
Gunner98
Posts: 5998
Joined: Fri Apr 29, 2005 12:49 am
Location: The Great White North!
Contact:

RE: Special Action question

Post by Gunner98 »

thanks guys

The function: ScenEdit_ExecuteEventAction() only works for lua actions not standard actions (as best I can tell)

Set up an inactive event, the SA activates it on a trigger that checks every min. Was trying to avoid a repetitive check in a 10 day long scenarios but it should work out ok.
Check out our novel, Northern Fury: H-Hour!: http://northernfury.us/
And our blog: http://northernfury.us/blog/post2/
Twitter: @NorthernFury94 or Facebook https://www.facebook.com/northernfury/
KnightHawk75
Posts: 1850
Joined: Thu Nov 15, 2018 7:24 pm

RE: Special Action question

Post by KnightHawk75 »

ORIGINAL: Gunner98

thanks guys

The function: ScenEdit_ExecuteEventAction() only works for lua actions not standard actions (as best I can tell)

Set up an inactive event, the SA activates it on a trigger that checks every min. Was trying to avoid a repetitive check in a 10 day long scenarios but it should work out ok.
Come to think of it probably right about the standard actions, I never tried using it with anything other than actions that were LuaScript actions. I think I miss understood the original post I took 'message' to mean some lua script action that was generating the message not the standard display message action. Good looking trying to avoid the constant checks, but sometimes you just can't.

User avatar
michaelm75au
Posts: 12465
Joined: Sat May 05, 2001 8:00 am
Location: Melbourne, Australia

RE: Special Action question

Post by michaelm75au »

Yes, the Special Action is aimed at 'scripting' an action (to perform a set of activities) rather than just running an Event Action. If you wanted to do that, it should be able to be controlled by an 'Event'.
Michael
Post Reply

Return to “Lua Legion”