SCRMaps
/
Sign in

The player loop

Once per cycle, once per player.

2 min read

EUD Editor 3 calls beforeTriggerExec once per trigger cycle. Logic that must run continuously goes there.

function beforeTriggerExec(){
    EUDPlayerLoop()();

    updateStatusLine();

    EUDEndPlayerLoop();
}

function afterTriggerExec(){
}

Code between EUDPlayerLoop()() and EUDEndPlayerLoop() runs once per player, and inside it CurrentPlayer and f_getcurpl() refer to that player. Omit the loop and every player ends up sharing one set of values.

The loop covers player indices 0 through 7, computers included. If something should only apply to humans, you have to filter on f_getcurpl() yourself.

var pid = f_getcurpl();
if(pid <= 6){
    // 사람 플레이어에게만 적용
}
Sign in to track your progress