I want all players to have hyper triggers but you said I need to get rid of the waits using death counters.
Having hyper triggers for only one (any) player remaining in the game is enough. Triggers would execute faster for all players even if hyper triggers are placed only for one of them.
I have a question to you, why do you put the action Kill Unit("Player 1", "Terran Firebat") under the condition Command("Current Player", "Terran Firebat", Exactly, 0)? Player 1 always owns exactly 0 firebats when the condition is met.
You can make a wait using death counter ("Rhynadon" unit, I suppose it cannot be killed in your map) like this:
Trigger("Player 1"){
Conditions:
Deaths("Current Player", "Rhynadon", Exactly, 1);
Actions:
Preserve trigger();
Set Switch("Red4thLife", set);
}
Trigger("Player 1"){
Conditions:
Deaths("Current Player", "Rhynadon", At least, 1);
Actions:
Preserve trigger();
Set Deaths("Current Player", "Rhynadon", Substract, 1);
}
Trigger("Player 1"){
Conditions:
Switch("RedStarting", set);
Command("Current Player", "Terran Firebat", Exactly, 0);
Actions:
// ??? Kill Unit("Player 1", "Terran Firebat");
Set Switch("RedStarting", clear);
Display Text Message(Always Display, "\x004You lost a life!\r\n\x006\x0134 lives remaining.");
Set Score("Current Player", Subtract, 1, Custom);
Set Deaths("Current Player", "Rhynadon", Set To, round(1500/84)+1);
}
I will explain the expression round(1500/84)+1 (SCMD dont allow expressions so you should manually calculate it).
Hypper triggers cicles repeat every 84ms. +1 is because you execute your action (Set Switch("Red4thLife", set)) when the counter is 1, but not 0. This is made to make your first two triggers reuseable. This means that setting deaths of Rhynadon to some (probably other) value in another trigger will automatically start the timer which would execute the Set Switch("Red4thLife", set) action every time it reaches 1.
Post has been edited 1 time(s), last time on Apr 23 2008, 9:12 pm by Wormer.
Some.