A map does not know how many people will join. The count feeds minimum-player checks, difficulty and reward sharing, so you almost always need it.
Trigger { -- 각 플레이어마다 한 번씩
players = {Force1},
conditions = {
Command(CurrentPlayer, AtLeast, 1, "Terran Marine");
Deaths(CurrentPlayer, Exactly, 0, "Joined");
},
actions = {
SetDeaths(CurrentPlayer, SetTo, 1, "Joined");
SetDeaths(P8, Add, 1, "PlayerCount");
SetDeaths(CurrentPlayer, SetTo, 1, "Level");
DisplayText("\x13\x07환영합니다");
PreserveTrigger();
},
}To scale difficulty by headcount, put PlayerCount straight into the condition.
Trigger { -- 4명 이상이면 보스 체력을 올린다
players = {P8},
conditions = {
Deaths(P8, AtLeast, 4, "PlayerCount");
Command(P8, AtLeast, 1, "Boss Unit");
},
actions = {
ModifyUnitHitPoints(All, "Boss Unit", P8, "Boss Room", 100);
PreserveTrigger();
},
}A player who leaves keeps their counters. To keep PlayerCount honest you either move to EUD, where f_playerexist exists, or recount each time from who still owns a unit.
