SCRMaps
/
Sign in

The basics

Variables, conditionals, functions. It looks familiar.

2 min read

EPScript is a scripting language for EUD work. Its syntax looks broadly like C or JavaScript.

function giveReward(){
    var amount = 0;
    if(Deaths(CurrentPlayer, AtLeast, 100, "Level")){
        amount = 500;
    }
    SetDeaths(CurrentPlayer, Add, amount, "Gold");
}

The important part is that classic trigger conditions and actions are callable as functions. Deaths() is a condition, SetDeaths() an action.

Declarations must come before use. There is no hoisting, so a global a function uses has to be declared above that function.

Sign in to track your progress