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.
