OFPEC Forum

Editors Depot - Mission Editing and Scripting => Arma2 - Editing/Scripting Multiplayer => Topic started by: Speeder on 15 Sep 2010, 09:42:28

Title: Trigger not activated by aircrafts
Post 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.
Title: Re: Trigger not triggered by aircrafts
Post by: JamesF1 on 15 Sep 2010, 13:28:48
You should be able to do something like this in your trigger condition line (untested - at work):
Code: [Select]
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 :)
Title: Re: Trigger not triggered by aircrafts
Post by: Speeder on 15 Sep 2010, 13:30:39
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?
Title: Re: Trigger not activated by aircrafts
Post by: F2kSel on 22 Sep 2010, 15:54:01
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.

Code: [Select]
this && !(thislist select 0 isKindOf "AIR")
Title: Re: Trigger not triggered by aircrafts
Post by: Mr.Peanut on 23 Sep 2010, 14:30:02
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.