Staredit Network

Staredit Network -> UMS Assistance -> Problem with a death counter
Report, edit, etc...Posted by CR_Fracture on 2006-06-06 at 15:23:54
I'm trying to use a death counter to time a leaderboard properly (you know how they cycle through different ones) but it doesn't work. The unit is dieing and everything, but it doesn't work. Here's how the trigger goes:

CODE
Deaths(P8, AtMost, 100, LEADERBOARD);
Deaths(P8, AtLeast, 1, LEADERBOARD);


LeaderBoardControl(Men, "|-Army Size-|");
LeaderBoardComputerPlayers(Disable);
PreserveTrigger();
Comment("Leaderboard 1");




Deaths(P8, AtMost, 200, LEADERBOARD);
Deaths(P8, AtLeast, 101, LEADERBOARD);


LeaderBoardKills(AnyUnit, "|-Kills-|");
LeaderBoardComputerPlayers(Disable);
PreserveTrigger();
Comment("Leaderboard 2");




Deaths(P8, AtMost, 300, LEADERBOARD);
Deaths(P8, AtLeast, 201, LEADERBOARD);


LeaderBoardControl(Buildings, "|-Country Size-|");
LeaderBoardComputerPlayers(Disable);
PreserveTrigger();
Comment("Leaderboard 3");




Deaths(P8, Exactly, 300, LEADERBOARD);


SetDeaths(P8, SetTo, 0, LEADERBOARD);
PreserveTrigger();
Comment("Leaderboard 4");


All triggers are for Player 8. What's wrong?

Report, edit, etc...Posted by Noober on 2006-06-06 at 15:44:05
You have to have a trigger that constantly adds deaths.
Report, edit, etc...Posted by CR_Fracture on 2006-06-06 at 15:46:39
QUOTE(Noober @ Jun 6 2006, 03:43 PM)
You have to have a trigger that constantly adds deaths.
[right][snapback]500756[/snapback][/right]


I have a trigger that says create unit, then kill it (the LEADERBOARD unit) and I know that works fine.

Does the killing of this unit count as a death?
Report, edit, etc...Posted by DevliN on 2006-06-06 at 15:48:16
I assume you have a trigger that is like:
Trigger
Players:
¤ Any player
Conditions:
¤ Player X has at least 0 deaths of UNIT.
¤ Player X has at most 300 deaths of UNIT.
Actions:
¤ Add 1 death for Player X of UNIT.
¤ Preserve trigger.


Obviously it wont work without that.

And you may want to change "Deaths(P8, Exactly, 300, LEADERBOARD);" to "Deaths(P8, At least, 300, LEADERBOARD);" although I don't know if it will fix your problem.

ADDITION:
QUOTE(CR_Fracture @ Jun 6 2006, 12:46 PM)
I have a trigger that says create unit, then kill it (the LEADERBOARD unit) and I know that works fine.

Does the killing of this unit count as a death?
[right][snapback]500761[/snapback][/right]

No. Use the trigger I posted above.
Report, edit, etc...Posted by Noober on 2006-06-06 at 15:51:18
Killing of a unit with triggers does not add to the killed unit's deaths nor the player's kills of that unit.
Report, edit, etc...Posted by CR_Fracture on 2006-06-06 at 15:52:45
QUOTE(Noober @ Jun 6 2006, 03:50 PM)
Killing of a unit with triggers does not add to the killed unit's deaths nor the player's kills of that unit.
[right][snapback]500768[/snapback][/right]


Ok, thanks, I'll try the trigger that devlin mentioned.
Report, edit, etc...Posted by DevliN on 2006-06-06 at 15:55:51
You're welcome. Glad to be of assistance. smile.gif
Next Page (1)