Jump to content

how to add a simple delay to trigger in DCS ME


anfieldroad

Recommended Posts

Hi,

 

I have a set of triggers set up to automate a bunch of AIs in a Top Gun style training dogfight scenario whereby when both flights check in at their start points they all have trigger actions to become immortal and weapons free. This allows them to fire at each other without damage and a trigger on "first blood" based on a hit event handler executes a "knock it off" where the trigger actions are reversed to weapons hold. I also have functionality in there to implement a hard deck.

 

However, I keep finding that in the engagement units are mysteriously getting blown out of the sky as if immortal was not set. I believe this is because multiple missiles might be in flight and so the first one hits, triggers the "knock it off" and immortality is turned off and then the second missile hits and before you know it someone is knocking on the door of some poor AI pilot's family with a sad letter from the secretary of the Air Force :P

 

I'd also imagine that in a guns scenario the first round to hit might disable immortal and the subsequent rounds then kill the unit.

 

So what I want to do is put in a 10 second or so delay in the actions in between the knock it off/weapons free and the units switching off immortality to allow for any other in-flight missiles to be resolved.

 

Any suggestions?

 

This mission uses MOOSE btw.

 

Also is there any way to restrict how many AAMs get fired by a unit at one target? That would also solve it if they cannot fire more than one missile at a time which is kinda wasteful given it's a training scenario.

Link to comment
Share on other sites

In scripts, Moose as well, there is a class called scheduler, that has options to make a timer/delay.

Using only the Triggers in ME you can do a "time since flag" condition and when a hit occurs set that flag, so after a couple seconds "since flag" you execute the original weapons hold etc.

Shagrat

 

- Flying Sims since 1984 -:pilotfly:

Win 10 | i5 10600K@4.1GHz | 64GB | GeForce RTX 3090 - Asus VG34VQL1B  | TrackIR5 | Simshaker & Jetseat | VPForce Rhino Base & VIRPIL T50 CM2 Stick on 200mm curved extension | VIRPIL T50 CM2 Throttle | VPC Rotor TCS Plus/Apache64 Grip | MFG Crosswind Rudder Pedals | WW Top Gun MIP | a hand made AHCP | 2x Elgato StreamDeck (Buttons galore)

Link to comment
Share on other sites

Thanks Shagrat. I think the time since option sounds better since I am setting a flag on hit detected.

 

I tested it and it works a treat

 

In scripts, Moose as well, there is a class called scheduler, that has options to make a timer/delay.

Using only the Triggers in ME you can do a "time since flag" condition and when a hit occurs set that flag, so after a couple seconds "since flag" you execute the original weapons hold etc.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...