Home   Help Search Login Register  

Author Topic: Trigger not activated by aircrafts  (Read 1937 times)

0 Members and 1 Guest are viewing this topic.

Offline Speeder

  • Members
  • *
    • OFP.nu
Trigger not activated by aircrafts
« 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.
« Last Edit: 22 Sep 2010, 11:25:28 by Speeder »
There are 10 kinds of people in this world. Those who get it, and those who don't.

Offline JamesF1

  • Editors Depot Staff
  • *****
    • JamesBurgess.co.uk
Re: Trigger not triggered by aircrafts
« Reply #1 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 :)

Offline Speeder

  • Members
  • *
    • OFP.nu
Re: Trigger not triggered by aircrafts
« Reply #2 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?
« Last Edit: 22 Sep 2010, 11:15:36 by Speeder »
There are 10 kinds of people in this world. Those who get it, and those who don't.

Offline F2kSel

  • Members
  • *
Re: Trigger not activated by aircrafts
« Reply #3 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")

Offline Mr.Peanut

  • Former Staff
  • ****
  • urp!
Re: Trigger not triggered by aircrafts
« Reply #4 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.
« Last Edit: 23 Sep 2010, 14:32:15 by Mr.Peanut »
urp!