Home   Help Search Login Register  

Author Topic: Trigger condition  (Read 460 times)

0 Members and 1 Guest are viewing this topic.

fragger

  • Guest
Trigger condition
« on: 31 Dec 2003, 20:50:07 »
I want to create a trigger which detects if something is in its activation area and only on the ground, not in the air. What would I put for conditions?  

j-man

  • Guest
Re:Trigger condition
« Reply #1 on: 31 Dec 2003, 22:00:25 »
This should work:


Quote
this and ((getpos unitname) select 2) < 5

You'll need to group the trigger with a unit. Then, change unitname to the name of what ever unit you want.

If this dosn't work, try going here  ;)
« Last Edit: 31 Dec 2003, 22:03:04 by j-man »

fragger

  • Guest
Re:Trigger condition
« Reply #2 on: 01 Jan 2004, 00:48:25 »
Thanks!  ;D

Offline Sui

  • Former Staff
  • ****
    • OFPEC
Re:Trigger condition
« Reply #3 on: 02 Jan 2004, 02:17:37 »
As an alternative, you could set the trigger to whatever side you want to trip it (east/west/civ/res present), and put the following in the condition line:

((count thislist)-("air" counttype thislist)) > 0

What that does is check how many units are in the trigger, minus the 'air' units. The trigger won't go off unless there are ground units in it.

That solves the problem of having to name your unit, or check for a specific unit in the trigger list.
Use the solution that best suits your situation ;)