Home   Help Search Login Register  

Author Topic: Trigger problem for get damage  (Read 626 times)

0 Members and 1 Guest are viewing this topic.

Offline pexmo

  • Members
  • *
  • I'm a llama!
Trigger problem for get damage
« on: 12 Jan 2005, 08:43:19 »
I have created a trigger that should check when the unit with the name FRIEND is at damage 1, dead.

I have put this in the condition field:

getdammage friend == 1;

And this in the on activation field:

hint "Friend has been killed";



The problem is that it only seems to work when i play as FRIEND otherwise i dont get the hint or any reaction to the condition i have trired. If i shoot friend nothing happens. But if i suicide as friend or get killed in any other way while playing as the unit friend i get the hint.

Anyone know why and how i can fix this?

Offline Sui

  • Former Staff
  • ****
    • OFPEC
Re:Trigger problem for get damage
« Reply #1 on: 12 Jan 2005, 09:13:27 »
Yeap... try this instead:

not (alive friend)

The getdammage command is a bit flaky when used to detect if a unit has been killed.

Often a unit can die and not have a dammage value of 1. Don't ask me how that works, but experience has shown me that there are far better ways than getdammage ;)

Offline nominesine

  • Former Staff
  • ****
  • I'm NOT back!
    • The IKB Forum
Re:Trigger problem for get damage
« Reply #2 on: 12 Jan 2005, 09:13:57 »
Change the condition of the trigger to: !(alive FRIEND)

Voila!
OFPEC | Intel Depot
RETARDED Ooops... Retired!

Offline nominesine

  • Former Staff
  • ****
  • I'm NOT back!
    • The IKB Forum
Re:Trigger problem for get damage
« Reply #3 on: 12 Jan 2005, 09:14:44 »
Simultaneous posting :-)
OFPEC | Intel Depot
RETARDED Ooops... Retired!

Offline Sui

  • Former Staff
  • ****
    • OFPEC
Re:Trigger problem for get damage
« Reply #4 on: 12 Jan 2005, 09:19:54 »
* Sui uses his supreme moderator powers to post faster ;D

Offline pexmo

  • Members
  • *
  • I'm a llama!
Re:Trigger problem for get damage
« Reply #5 on: 12 Jan 2005, 09:43:21 »
hehe thx guys