Jump to content

Trigger stop condition when group is killed.


Recommended Posts

Posted

Hello,

 

 

I am trying hard but still fail to achieve...

The scenario is that there are three Red EWR groups, and JTAC that have waypoints above each of them with task "Orbit".

 

 

 

There's created trigger on mission start that does script initializing the variables for these groups:

RedEWR1 = Group.getByName('RED EWR 1')
RedEWR2 = Group.getByName('RED EWR 2')
RedEWR6 = Group.getByName('RED EWR 6')

 

 

Then, in the stop conditions of these JTAC Orbit waypoints there are Lua predicates like:

if (RedEWR1 == nil) then return true else return false end

and these predicates seems not work as expected, as JTAC is not moving to next waypoint after the group he's orbiting above is destroyed.

 

I know that I could achieve it with flag based triggers, but there's no trigger condition that could be based on whole group, but specific units and number of units for each of EWR group is significant.

 

 

Is it something wrong with my Lua predicate, or this mechanism is just not working?

Natural Born Kamikaze

-------------------------

AMD Ryzen 5 3600, AMD Fatal1ty B450 Gaming K4, AMD Radeon RX 5700 XT, 32 GB RAM Corsair Vengeance LPX, PSU Modecom Volcano 750W, Virpil Constellation Alpha Prime on Moza AB9 base, Virpil MongoosT-50CM3 Throttle, Turtle Beach VelocityOne Rudder.

Posted

And why not check that the group is actually alive or not, rather than if it returns the group's name?

 

 

Errrr... is there specific function for that?

Natural Born Kamikaze

-------------------------

AMD Ryzen 5 3600, AMD Fatal1ty B450 Gaming K4, AMD Radeon RX 5700 XT, 32 GB RAM Corsair Vengeance LPX, PSU Modecom Volcano 750W, Virpil Constellation Alpha Prime on Moza AB9 base, Virpil MongoosT-50CM3 Throttle, Turtle Beach VelocityOne Rudder.

  • Recently Browsing   0 members

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