trigger that fires after X time (Full Version)

All Forums >> [New Releases from Matrix Games] >> Command: Modern Operations series >> Mods and Scenarios >> Lua Legion



Message


orca -> trigger that fires after X time (12/1/2018 3:51:24 PM)

Is there a lua code that can fire and be used to trigger an action after a set amount of time?

For example:

I want to launch a fighter strike (mission name- "fighter strike 2") 60 minutes after a different fighter strike is launched (mission- "fighter strike 1"). The goal is to coordinate the strikes so that they both arrive at the target at the same time.

thanks




Whicker -> RE: trigger that fires after X time (12/1/2018 4:20:08 PM)

why not use the activation time for the missions? is there something that triggers strike 1 that you don't actually know the time of strike 2?

If you look in here for the in-game timer that I posted it has an example of how to make an event with a time trigger that the user sets.




orca -> RE: trigger that fires after X time (12/1/2018 5:41:57 PM)

Thanks for the reply. Strike 1 is triggered when a naval group comes within a certain range so the time is not known in advance.

I’ll try to look at your in-game timer. Would the timer be used as an ”condition” in an event to activate strike 2?


quote:

ORIGINAL: Whicker

why not use the activation time for the missions? is there something that triggers strike 1 that you don't actually know the time of strike 2?

If you look in here for the in-game timer that I posted it has an example of how to make an event with a time trigger that the user sets.




Whicker -> RE: trigger that fires after X time (12/1/2018 7:37:43 PM)

the timer would just be an example of how to set up an event with a time trigger of a variable nature. As it is it would not do much for you but is an example of some of what you would need I think.
I can see how to set the time for the second strike in lua, but not sure what would trigger the lua if the strike is just based on distance and if the enemy is detected. I wonder is there is a trigger for a strike launching? or maybe it is the strike 1 ac leaves the area (base)?

Maybe the triggers could be based on unit enters area rather than time/distance? if the ships are already detected this might be easier, then the strike 1 could be unit enters area, strike 2 could be unit stays in area for 60 minutes?

I'm still trying to figure out strike missions, they seem a little complicated.




orca -> RE: trigger that fires after X time (12/1/2018 9:31:36 PM)

I currently do something similar. I have strike 1 launch and then strike 2 activates when it flies past the strike 2 base with a unit it enters area trigger. Then both arrive at target at a similar time. I guess this works fine but was wondering if there were a more elegant method.


quote:

ORIGINAL: Whicker

the timer would just be an example of how to set up an event with a time trigger of a variable nature. As it is it would not do much for you but is an example of some of what you would need I think.
I can see how to set the time for the second strike in lua, but not sure what would trigger the lua if the strike is just based on distance and if the enemy is detected. I wonder is there is a trigger for a strike launching? or maybe it is the strike 1 ac leaves the area (base)?

Maybe the triggers could be based on unit enters area rather than time/distance? if the ships are already detected this might be easier, then the strike 1 could be unit enters area, strike 2 could be unit stays in area for 60 minutes?

I'm still trying to figure out strike missions, they seem a little complicated.





hasler -> RE: trigger that fires after X time (12/3/2018 4:29:01 AM)

Sort of. You can do a few things. One is set the missions to inactive. Set a trigger with whatever your first mission is. Then in the Lus action set missions to active, set the units assigned to the second mission to a 60 minute ready timer. I believe that is the simplest way to ensure you get the one hour second launch.




Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
0.8125