Blockland hates infinite loops, and stuffs itself whenever you use them.
Use schedule to create a delayed loop.
function scheduledLoop(%bool) {
if(isEventPending($scheduledLoop)) {
cancel($scheduledLoop);
}
if(!%bool) {
return;
}
// code here
$scheduleLoop = schedule(100, 0, scheduledLoop, %bool);
}
Schedule's arguments are (delayInMS, referenceObject, functionName, arg0, ...).
This will repeat the function scheduledLoop every 100ms, or 1/10th of a second.
scheduledLoop(true); will start it, and scheduledLoop(false); will stop it.