A race is the escape-map structure with two changes: completing a circuit resets the checkpoint counter and adds a lap, and the finish line records the order people cross it.
Trigger { -- 결승선: 마지막 체크포인트를 지난 사람만
players = {Force1},
conditions = {
Bring(CurrentPlayer, AtLeast, 1, "Men", "Finish");
Deaths(CurrentPlayer, Exactly, 4, "Checkpoint");
},
actions = {
SetDeaths(CurrentPlayer, SetTo, 0, "Checkpoint");
SetDeaths(CurrentPlayer, Add, 1, "Lap");
PreserveTrigger();
},
}Placement comes from a single shared counter: whoever crosses takes its current value, and bumps it by one on the way past.
Trigger { -- 완주: 들어온 순서를 받아 적는다
players = {Force1},
conditions = {
Deaths(CurrentPlayer, AtLeast, 3, "Lap");
Deaths(CurrentPlayer, Exactly, 0, "Placed");
},
actions = {
SetDeaths(CurrentPlayer, SetTo, 1, "Placed");
SetDeaths(P8, Add, 1, "NextPlace");
SetScore(CurrentPlayer, Add, 1, Custom);
DisplayText("\x13\x03완주!");
PreserveTrigger();
},
}For places to be unique, taking the shared counter and incrementing it must happen in the same trigger. Split across two and any players arriving on the same cycle get the same place.
