think death counters like a switch
in a switch (boolean for those VB people)
you have 2 values 0 and 1, 0 for false(or clear) and 1 for true(or set)
in a death counter (any variable)
you have a very large value,
from 0 to..whatever the limit is. 0,1,2,3,4,5,6... etc
they are exactly like switchs except worded differently and have different ways to interact with.
like said before, a unit that dies = +1 death count (so use a unit that doens't die)
use the death action for setting the variable(death) amount
use the suffer for the check tEH VALUEZ1!!111 (greater than, equal to, less than)
QUOTE(CheeZe(U) @ Aug 26 2004, 09:05 PM)
think death counters like a switch
in a switch (boolean for those VB people)
you have 2 values 0 and 1, 0 for false(or clear) and 1 for true(or set)
in a death counter (any variable)
you have a very large value,
from 0 to..whatever the limit is. 0,1,2,3,4,5,6... etc
they are exactly like switchs except worded differently and have different ways to interact with.
like said before, a unit that dies = +1 death count (so use a unit that doens't die)
use the death action for setting the variable(death) amount
use the suffer for the check tEH VALUEZ1!!111 (greater than, equal to, less than)
A death value isnt like a switch. A switch is a boolean, with 2 possible values, True or False.
A death value is more of an integer. You can set it, add things to it, and subtract from it. An example of where to use death value is for locked doors.
Conditions:Current player brings atleast one any unit to location "door"
Current player has suffered exactly 0 deaths of map revealer
Actions:Display Text Message: Door is locked, you need a key!
Wait 5000 Milliseconds
Preserve Trigger
-------------------------------------------------
Conditions:Current player brings atleast one any unit to location "door"
Current player has suffered exactly 1 deaths of map revealer
Actions:Disable doodad state for all lower level door at door
-------------------------------------------------
Conditions:Current player brings atleast one any unit to location "key"
Current player has suffered exactly 0 deaths of map revealer
Actions:Display Text Message "You found the key! You can now unlock that door!"
Modify death counts for Current Player: Set to 1 for Map Revealer
what do you mean it's not like a switch?? i just described why it's like one...
switch = 2 values, 0 and 1, clear and set, on and off, true and false, etc
death counter = whatever the limit is, 0,1,2,3,4...etc, functions, 0 = off, 1 and higher can be on for different events.
notice that deathcounter CAN also use 0,1, clear and set (same thing!)

He likely doesn't understand them at all, such is the way of many who come to these shores!
Death Counters are not like Switches really, and they have 256 possible states compared to two, and so cannot just be Toggeled, nor can them be randomised, well they can but it is really complicated, and this isn't the time for that...
They are only added to through Non-Trigger effect when the unit is actually killed within the game by another unit, not by the Kill Trigger.
In actions it is called "Set Deaths", and you can choose what player it is for, the unit in question, and the amount of deaths. It works just like Custom score in fact.
these are my 3 tiggers
Deaths(P7, Exactly, 0, GAME);
Wait(456000);
CenterView(Begining center);
Comment("Begin");
SetDeaths(P7, SetTo, 1, GAME);
Deaths(Force3, Exactly, 1, GAME);
CreateUnit(1, Civilian, ! spawn1, P1);
CreateUnit(1, Civilian, ! spawn1, P2);
CreateUnit(1, Civilian, ! spawn2, P3);
CreateUnit(1, Civilian, ! spawn2, P4);
CreateUnit(1, Civilian, ! spawn3, P5);
CreateUnit(1, Civilian, ! spawn3, P6);
SetCountdownTimer(SetTo, 300);
Wait(30000);
SetDeaths(P7, SetTo, 2, GAME);
Deaths(Force3, Exactly, 2, GAME);
MoveUnit(All, Civilian, P1, Island, ! spawn1);
MoveUnit(All, Civilian, P2, Island, ! spawn1);
MoveUnit(All, Civilian, P3, Island, ! spawn2);
MoveUnit(All, Civilian, P4, Island, ! spawn2);
MoveUnit(All, Civilian, P5, Island, ! spawn3);
MoveUnit(All, Civilian, P6, Island, ! spawn3);
GiveUnits(All, Civilian, Force1, ! spawn1, P12);
GiveUnits(All, Civilian, Force1, ! spawn2, P12);
GiveUnits(All, Civilian, Force1, ! spawn3, P12);
SetDeaths(P7, SetTo, 3, GAME);
Comment("game 2");