Home   Help Search Login Register  

Author Topic: Make a trigger specific to one unit  (Read 493 times)

0 Members and 1 Guest are viewing this topic.

vovi

  • Guest
Make a trigger specific to one unit
« on: 10 Jul 2005, 12:12:39 »
I have a helicopter named 'heli1', and a trigger that spans the whole of a battlefield.

This helicopter is under attack inconsistently throughout the mission. Sometimes it is destroyed, sometimes it survives.

If it is destroyed, i'd like a script to play.

Is this a case of checking a unit is alive?

If so I would appreciate any help..

vovi

  • Guest
Re:Make a trigger specific to one unit
« Reply #1 on: 10 Jul 2005, 12:15:38 »
In addition to that I was wondering, is it possible to do the above and play a script, but instead triggering it when the unit reaches a certain setdammage?

Crassus

  • Guest
Re:Make a trigger specific to one unit
« Reply #2 on: 10 Jul 2005, 13:30:24 »
 ;D
« Last Edit: 10 Jul 2005, 14:04:23 by Crassus »

Offline Pilot

  • Contributing Member
  • **
Re:Make a trigger specific to one unit
« Reply #3 on: 10 Jul 2005, 13:37:20 »
To check if it is destroyed, make a trigger and put in the condition field:
not (alive vehicle)
Where vehicle is the name of the vehicle

Or, if you want to check for damage:
getdammage vehicle >= amount
Where vehicle is the name of the vehicle and amount is the amount of damage you want the vehicle to take before running the script.

Call the script from the On Activation field of the triggers

*Syntax not guarenteed

-Student Pilot
« Last Edit: 10 Jul 2005, 13:37:50 by Student Pilot »