function onCreated() { amazingFunction(); } function amazingFunction() { if (player.z < 2) return false; else continue; }