Matrix Games Forums

Forums  Register  Login  Photo Gallery  Member List  Search  Calendars  FAQ 

My Profile  Inbox  Address Book  My Subscription  My Forums  Log Out

trigger that fires after X time

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
  Printable Version
All Forums >> [New Releases from Matrix Games] >> Command: Modern Operations series >> Mods and Scenarios >> Lua Legion >> trigger that fires after X time Page: [1]
Login
Message << Older Topic   Newer Topic >>
trigger that fires after X time - 12/1/2018 3:51:24 PM   
orca

 

Posts: 501
Joined: 11/6/2013
Status: offline
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
Post #: 1
RE: trigger that fires after X time - 12/1/2018 4:20:08 PM   
Whicker

 

Posts: 664
Joined: 6/20/2018
Status: offline
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.

(in reply to orca)
Post #: 2
RE: trigger that fires after X time - 12/1/2018 5:41:57 PM   
orca

 

Posts: 501
Joined: 11/6/2013
Status: offline
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.


< Message edited by orca -- 12/1/2018 5:43:57 PM >

(in reply to Whicker)
Post #: 3
RE: trigger that fires after X time - 12/1/2018 7:37:43 PM   
Whicker

 

Posts: 664
Joined: 6/20/2018
Status: offline
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.

(in reply to orca)
Post #: 4
RE: trigger that fires after X time - 12/1/2018 9:31:36 PM   
orca

 

Posts: 501
Joined: 11/6/2013
Status: offline
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.


(in reply to Whicker)
Post #: 5
RE: trigger that fires after X time - 12/3/2018 4:29:01 AM   
hasler

 

Posts: 39
Joined: 7/31/2017
Status: offline
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.

(in reply to orca)
Post #: 6
Page:   [1]
All Forums >> [New Releases from Matrix Games] >> Command: Modern Operations series >> Mods and Scenarios >> Lua Legion >> trigger that fires after X time Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts


Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI

1.391