Quote from Triggers
dcIamHere = "Cave"
dcMessage = "Cave-in"Set up a bit in the current player's DCREPLICATE FOR EACH p FROM 1 TO 8
TRIGGER
OWNERS: Player p
CONDITIONS:
ACTIONS:
Modify death counts for Current Player: Set 2^(p-1) for dcIamHere.
END REPLICATEDetect gone playersREPLICATE FOR EACH p FROM 8 DOWNTO 1
TRIGGER
OWNERS: All Players
CONDITIONS:
All Players has suffered At Least 2^(p-1) deaths of dcIamHere.
ACTIONS:
Modify death counts for Player p: Set 0 for dcIamHere.
Wait for 0 milliseconds.
Modify death counts for Player p: Set 2^(p-1) for dcIamHere.
Preserve trigger.
TRIGGER
OWNERS: All Players
CONDITIONS:
All Players has suffered At Most 2^(p-1) deaths of dcIamHere.
Player p has suffered At Least 1 deaths of dcIamHere.
ACTIONS:
Modify death counts for Player p: Set 0 for dcIamHere.
Modify death counts for All Players: Add 2^(p-1) for dcMessage.
END REPLICATEDisplay messageREPLICATE FOR EACH p FROM 1 TO 8
TRIGGER
OWNERS: All Players
CONDITIONS:
Current Player has suffered At Least 2^(p-1) deaths of dcMessage.
ACTIONS:
Display for current player: "Player p has left the game."
Modify death counts for Current Player: Subtract 2^(p-1) for dcMessage.
END REPLICATE
Quote from Macro Triggers
FORCE AllPlayers = @F("All Players") // A walkaround against MT bug
UNIT dcIamHere = @U("Cave")
UNIT dcMessage = @U("Cave-in")Set up a bit in the current player's DCFOR p = 1 TO 8 DO
TRIGGER
OWNERS: @P(p)
CONDITIONS:
ACTIONS:
SetDeaths(@CurrentPlayer, @Set, 2^(p-1), dcIamHere)
ENDT
ENDLDetect gone playersFOR p = 8 TO 1 BY -1 DO
TRIGGER
OWNERS: AllPlayersWalkaround
CONDITIONS:
Deaths(@AllPlayers, @AtLeast, 2^(p-1), dcIamHere)
ACTIONS:
SetDeaths(@P(p), @Set, 0, dcIamHere)
Wait(0)
SetDeaths(@P(p), @Set, 2^(p-1), dcIamHere)
PreserveTrigger()
ENDT
TRIGGER
OWNERS: AllPlayersWalkaround
CONDITIONS:
Deaths(@AllPlayers, @AtMost, 2^(p-1), dcIamHere)
Deaths(@P(p), @AtLeast, 1, dcIamHere)
ACTIONS:
SetDeaths(@P(p), @Set, 0, dcIamHere)
SetDeaths(@AllPlayers, @Add, 2^(p-1), dcMessage)
ENDT
ENDLDisplay messageFOR p = 1 TO 8 DO
TRIGGER
OWNERS: AllPlayersWalkaround
CONDITIONS:
Deaths(@CurrentPlayer, @AtLeast, 2^(p-1), dcMessage)
ACTIONS:
DisplayText("Player "+p+" has left the game.", @AlwaysDisplay)
SetDeaths(@CurrentPlayer, @Subtract, 2^(p-1), dcMessage)
ENDT
ENDL
Quote from SCMD Triggers
Set up a bit in the current player's DCTrigger("Player 1") {
Conditions:
Actions:
Set Deaths("Current Player", "Cave", Set To, 1);
}
Trigger("Player 2") {
Conditions:
Actions:
Set Deaths("Current Player", "Cave", Set To, 2);
}
Trigger("Player 3") {
Conditions:
Actions:
Set Deaths("Current Player", "Cave", Set To, 4);
}
Trigger("Player 4") {
Conditions:
Actions:
Set Deaths("Current Player", "Cave", Set To, 8);
}
Trigger("Player 5") {
Conditions:
Actions:
Set Deaths("Current Player", "Cave", Set To, 16);
}
Trigger("Player 6") {
Conditions:
Actions:
Set Deaths("Current Player", "Cave", Set To, 32);
}
Trigger("Player 7") {
Conditions:
Actions:
Set Deaths("Current Player", "Cave", Set To, 64);
}
Trigger("Player 8") {
Conditions:
Actions:
Set Deaths("Current Player", "Cave", Set To, 128);
}Detect gone playersTrigger("All Players") {
Conditions:
Deaths("All Players", "Cave", At Least, 128);
Actions:
Set Deaths("Player 8", "Cave", Set To, 0);
Wait(0);
Set Deaths("Player 8", "Cave", Set To, 128);
Preserve trigger();
}
Trigger("All Players") {
Conditions:
Deaths("All Players", "Cave", At Most, 128);
Deaths("Player 8", "Cave", At Least, 1);
Actions:
Set Deaths("Player 8", "Cave", Set To, 0);
Set Deaths("All Players", "Cave-in", Add, 128);
}
Trigger("All Players") {
Conditions:
Deaths("All Players", "Cave", At Least, 64);
Actions:
Set Deaths("Player 7", "Cave", Set To, 0);
Wait(0);
Set Deaths("Player 7", "Cave", Set To, 64);
Preserve trigger();
}
Trigger("All Players") {
Conditions:
Deaths("All Players", "Cave", At Most, 64);
Deaths("Player 7", "Cave", At Least, 1);
Actions:
Set Deaths("Player 7", "Cave", Set To, 0);
Set Deaths("All Players", "Cave-in", Add, 64);
}
Trigger("All Players") {
Conditions:
Deaths("All Players", "Cave", At Least, 32);
Actions:
Set Deaths("Player 6", "Cave", Set To, 0);
Wait(0);
Set Deaths("Player 6", "Cave", Set To, 32);
Preserve trigger();
}
Trigger("All Players") {
Conditions:
Deaths("All Players", "Cave", At Most, 32);
Deaths("Player 6", "Cave", At Least, 1);
Actions:
Set Deaths("Player 6", "Cave", Set To, 0);
Set Deaths("All Players", "Cave-in", Add, 32);
}
Trigger("All Players") {
Conditions:
Deaths("All Players", "Cave", At Least, 16);
Actions:
Set Deaths("Player 5", "Cave", Set To, 0);
Wait(0);
Set Deaths("Player 5", "Cave", Set To, 16);
Preserve trigger();
}
Trigger("All Players") {
Conditions:
Deaths("All Players", "Cave", At Most, 16);
Deaths("Player 5", "Cave", At Least, 1);
Actions:
Set Deaths("Player 5", "Cave", Set To, 0);
Set Deaths("All Players", "Cave-in", Add, 16);
}
Trigger("All Players") {
Conditions:
Deaths("All Players", "Cave", At Least, 8);
Actions:
Set Deaths("Player 4", "Cave", Set To, 0);
Wait(0);
Set Deaths("Player 4", "Cave", Set To, 8);
Preserve trigger();
}
Trigger("All Players") {
Conditions:
Deaths("All Players", "Cave", At Most, 8);
Deaths("Player 4", "Cave", At Least, 1);
Actions:
Set Deaths("Player 4", "Cave", Set To, 0);
Set Deaths("All Players", "Cave-in", Add, 8);
}
Trigger("All Players") {
Conditions:
Deaths("All Players", "Cave", At Least, 4);
Actions:
Set Deaths("Player 3", "Cave", Set To, 0);
Wait(0);
Set Deaths("Player 3", "Cave", Set To, 4);
Preserve trigger();
}
Trigger("All Players") {
Conditions:
Deaths("All Players", "Cave", At Most, 4);
Deaths("Player 3", "Cave", At Least, 1);
Actions:
Set Deaths("Player 3", "Cave", Set To, 0);
Set Deaths("All Players", "Cave-in", Add, 4);
}
Trigger("All Players") {
Conditions:
Deaths("All Players", "Cave", At Least, 2);
Actions:
Set Deaths("Player 2", "Cave", Set To, 0);
Wait(0);
Set Deaths("Player 2", "Cave", Set To, 2);
Preserve trigger();
}
Trigger("All Players") {
Conditions:
Deaths("All Players", "Cave", At Most, 2);
Deaths("Player 2", "Cave", At Least, 1);
Actions:
Set Deaths("Player 2", "Cave", Set To, 0);
Set Deaths("All Players", "Cave-in", Add, 2);
}
Trigger("All Players") {
Conditions:
Deaths("All Players", "Cave", At Least, 1);
Actions:
Set Deaths("Player 1", "Cave", Set To, 0);
Wait(0);
Set Deaths("Player 1", "Cave", Set To, 1);
Preserve trigger();
}
Trigger("All Players") {
Conditions:
Deaths("All Players", "Cave", At Most, 1);
Deaths("Player 1", "Cave", At Least, 1);
Actions:
Set Deaths("Player 1", "Cave", Set To, 0);
Set Deaths("All Players", "Cave-in", Add, 1);
}Display messageTrigger("All Players") {
Conditions:
Deaths("Current Player", "Cave-in", At Least, 1);
Actions:
Display Text Message(Always Display, "Player 1 has left the game.");
Set Deaths("Current Player", "Cave-in", Subtract, 1);
}
Trigger("All Players") {
Conditions:
Deaths("Current Player", "Cave-in", At Least, 2);
Actions:
Display Text Message(Always Display, "Player 2 has left the game.");
Set Deaths("Current Player", "Cave-in", Subtract, 2);
}
Trigger("All Players") {
Conditions:
Deaths("Current Player", "Cave-in", At Least, 4);
Actions:
Display Text Message(Always Display, "Player 3 has left the game.");
Set Deaths("Current Player", "Cave-in", Subtract, 4);
}
Trigger("All Players") {
Conditions:
Deaths("Current Player", "Cave-in", At Least, 8);
Actions:
Display Text Message(Always Display, "Player 4 has left the game.");
Set Deaths("Current Player", "Cave-in", Subtract, 8);
}
Trigger("All Players") {
Conditions:
Deaths("Current Player", "Cave-in", At Least, 16);
Actions:
Display Text Message(Always Display, "Player 5 has left the game.");
Set Deaths("Current Player", "Cave-in", Subtract, 16);
}
Trigger("All Players") {
Conditions:
Deaths("Current Player", "Cave-in", At Least, 32);
Actions:
Display Text Message(Always Display, "Player 6 has left the game.");
Set Deaths("Current Player", "Cave-in", Subtract, 32);
}
Trigger("All Players") {
Conditions:
Deaths("Current Player", "Cave-in", At Least, 64);
Actions:
Display Text Message(Always Display, "Player 7 has left the game.");
Set Deaths("Current Player", "Cave-in", Subtract, 64);
}
Trigger("All Players") {
Conditions:
Deaths("Current Player", "Cave-in", At Least, 128);
Actions:
Display Text Message(Always Display, "Player 8 has left the game.");
Set Deaths("Current Player", "Cave-in", Subtract, 128);
}
Post has been edited 5 time(s), last time on Aug 25 2009, 12:10 pm by Wormer. Reason: Don't pay attention at my rubbish...
Some.