OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: pexmo 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?
-
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 ;)
-
Change the condition of the trigger to: !(alive FRIEND)
Voila!
-
Simultaneous posting :-)
-
/me uses his supreme moderator powers to post faster ;D
-
hehe thx guys