//#CLIENTSIDE function onCreated() { this.on = false; this.setTimer(0.05); } function onTimeout() { if (this.on == false) { if (someCheck()) { this.on = true; } } else { if (someOtherCheck()) { this.on = false; } } this.setTimer(0.05); }