Home   Help Search Login Register  

Author Topic: Trigger only triggered by groundunits?  (Read 488 times)

0 Members and 1 Guest are viewing this topic.

Swaty

  • Guest
Trigger only triggered by groundunits?
« on: 09 Jan 2005, 15:56:57 »
I have seen tutorials that tell the trigger to not be triggered by a specific chopper, but is it possible to make the trigger only react to groundunits? Like limiting the height on the trigger or something?

Swaty

bored_onion

  • Guest
Re:Trigger only triggered by groundunits?
« Reply #1 on: 09 Jan 2005, 16:49:07 »
i dont think you can detect units with the z axis. however, if you only have one or two types of air unit which you want to be exempt from the trigger then you can put a check in the script you are calling which goes something like:

Code: [Select]
_type = typeof _unit

? _type= "AirUnit1Type" OR _type!= "AirUnit2Type": goto "end"

;stuff you want to do

#end

exit

where _unit is the unit activating the trigger. not sure how you would be able to put the variable into the script from the trigger though.

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re:Trigger only triggered by groundunits?
« Reply #2 on: 09 Jan 2005, 17:07:22 »
You can use this in the condition field of the trigger:

"LandVehicle" countType thisList > 0 || "Man" countType thisList > 0

Now the trigger activates when a vehicle or a soldier comes within the trigger area...

EDIT:
Of course the trigger must be set to be triggered by the wanted side, or Anybody...
« Last Edit: 09 Jan 2005, 17:12:33 by HateR_Kint »
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.

Offline Triggerhappy

  • Contributing Member
  • **
  • Llama, it's what's for dinner.
Re:Trigger only triggered by groundunits?
« Reply #3 on: 09 Jan 2005, 17:33:06 »
in condition:
this && {(getpos _x select 2) <= 3} count thislist > 0

may also work.
It pretty much the same as what HateR said.