The idle loop is short: pay income on a period, and let the player spend that income on more income. Two counters do it - money, and level.
Trigger { -- 1초마다 단계만큼 돈을 준다
players = {Force1},
conditions = {
Deaths(P8, AtLeast, 24, "IncomeTimer");
Deaths(CurrentPlayer, AtLeast, 1, "Level");
},
actions = {
SetDeaths(CurrentPlayer, Add, 10, "Money");
PreserveTrigger();
},
}There is no multiply in classic triggers, so you cannot pay level x rate directly. The normal answer is one trigger per level, each adding its own amount; when the levels outgrow that, it is time for EUD.
Buying is the shop lesson again: check the money, subtract it, raise the level.
Trigger { -- 업그레이드 발판
players = {Force1},
conditions = {
Bring(CurrentPlayer, AtLeast, 1, "Men", "Upgrade Pad");
Deaths(CurrentPlayer, AtLeast, 500, "Money");
},
actions = {
SetDeaths(CurrentPlayer, Subtract, 500, "Money");
SetDeaths(CurrentPlayer, Add, 1, "Level");
MoveUnit(All, "Men", CurrentPlayer, "Upgrade Pad", "Pad Exit");
DisplayText("\x13\x07단계가 올라갔습니다");
PreserveTrigger();
},
}This loop is the floor under maps like 직업키우기: hunt for money, spend it on hunting better, repeat.
