Amarok_73 Posted September 14, 2020 Posted September 14, 2020 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.
fargo007 Posted September 15, 2020 Posted September 15, 2020 I thought the lua predicates were limited to true/false statements like checking variable values. You've got actual logic in there. And why not check that the group is actually alive or not, rather than if it returns the group's name? Have fun. Don't suck. Kill bad guys. https://discord.gg/blacksharkden/
Amarok_73 Posted September 15, 2020 Author Posted September 15, 2020 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.
Recommended Posts