Home   Help Search Login Register  

Author Topic: Making triggers activate after an object is destroyed  (Read 460 times)

0 Members and 1 Guest are viewing this topic.

Offline Tim Pink

  • ECP Team &
  • Former Staff
  • ****
  • "Down with a bang and that'll be the end"
Hi

Just a simple Q

i know you can use "not alive bob" to activate a trigger or condition but bob is a unit or soldier.

Can u use the same code for an object? eg "not alive Ammocrate"?
because i want a trigger to be activated after i destroy a heap of ammo crates.

Thanks

Tim
"Whoever said nothing is impossible, never tried slamming a revolving door."

mikeb

  • Guest
Re:Making triggers activate after an object is destroyed
« Reply #1 on: 28 Oct 2003, 13:12:22 »
not sure, try it!!!

if it doesn't work use the getdammage command

getdammage UNITNAME >=1

values of dammage being 0 (undamaged) to 1 (dead)

Offline ACF

  • Members
  • *
  • Llama?? Ain't that French for tanks?
Re:Making triggers activate after an object is destroyed
« Reply #2 on: 28 Oct 2003, 13:22:52 »
The pure logic is:

Damage thing == 1

Note that Damage is an analogue value 0-1, not a digital state 0 or 1, so I tend to use:

Damage thing > 0.9

or whatever seems a suitable figure.  The AI does tend to keep engaging nearly dead targets until they are really dead, but I don't trust it to.  In your case, a [very] badly placed charge may only damage not destroy your crates and not trip the trigger.