OFPEC Forum
Editors Depot - Mission Editing and Scripting => Arma2 - Editing/Scripting Multiplayer => Topic started by: Speeder on 15 Sep 2010, 09:42:28
-
I know this has been asked before, but as it turns out, I'm apparently a complete imbicile with the search function, and can't find anything.
I would like to know how to make a trigger activate by any Bluefor unit, except if the unit is a aircraft.
So if a bluefor man walks into the trigger, it will activate, but if the same man flies into the trigger, it will not activate.
Setcaptive is not an option.
-
You should be able to do something like this in your trigger condition line (untested - at work):
this && ({_x isKindOf "LAND"} count thisList)>0
Of course, it should still be set to be activated by BLUFOR, but the above should exclude any air vehicles :)
-
Most excellent
EDIT: Testet and working.
I testet it in a MP game, and it caused serious lag. Is there another way of doing it?
Is something like foreach thislist a better solution, and how would I go about it?
-
You could try just checking the unit who is activating the trigger rather than all the units in the trigger area.
Not tested in MP though.
this && !(thislist select 0 isKindOf "AIR")
-
I testet it in a MP game, and it caused serious lag. Is there another way of doing it?
Is something like foreach thislist a better solution, and how would I go about it?
How big is your trigger? Map sized?
F2ksel's suggestion will only work if it is guaranteed that the first unit(of the correct side) that enters the trigger is the aircraft. If you want it to work for a specific aircraft, then group the trigger with the aircraft and you are done.