thetrooper 10 Posted February 28, 2016 Hi all, got a couple of questions around && and || .Basically who do I get this code to work? (ff1 distance civ1 < 5 || ff2 distance civ1 < 5 || ff3 distance civ1 < 5 || ff4 distance civ1 < 5) && !alive murder1 && !alive en12; I'm trying to say if these units are less then 5m away from a unit but also two other units have to be dead?Trying to add it into a condition field. Also how would I write it if in a SQF file? Share this post Link to post Share on other sites
Grumpy Old Man 3540 Posted February 28, 2016 Should work for a triggers condition field: {_x distance civ1 < 5} count [ff1,ff2,ff3] > 0 AND {!alive murder1} AND {!alive en12} Should work inside execVMed .sqf: waitUntil {{_x distance civ1 < 5} count [ff1,ff2,ff3] > 0 AND {!alive murder1} AND {!alive en12}}; Cheers Share this post Link to post Share on other sites
thetrooper 10 Posted February 28, 2016 Should work for a triggers condition field: {_x distance civ1 < 5} count [ff1,ff2,ff3] > 0 AND {!alive murder1} AND {!alive en12} Should work inside execVMed .sqf: waitUntil {{_x distance civ1 < 5} count [ff1,ff2,ff3] > 0 AND {!alive murder1} AND {!alive en12}}; Cheers hmmm, unit is still joining group when murder1 and en12 are still alive. They though only be joining if both of these are dead. Any ideas? Share this post Link to post Share on other sites
Grumpy Old Man 3540 Posted February 29, 2016 hmmm, unit is still joining group when murder1 and en12 are still alive. They though only be joining if both of these are dead. Any ideas? The snippet is working just fine. Only returns true if both murder1 and en12 are dead and at least one of the ffn is closer to civ1 than 5 meters. {_x distance civ1 < 5} count [ff1,ff2,ff3,ff4] > 0 AND {!alive murder1} AND {!alive en12} Post the rest of the code that isn't working, anything else is just a guess out of the blue. Cheers Share this post Link to post Share on other sites