Wtf use a schedule then
Doesn't hold up the game.
function retrieveData(%data)
{
for(%i=0;%i<999999;%i++)
doNothing(%i);
echo("Data retrieved");
return %data;
}
function doNothing(%i)
{
if(%i <= 0)
return;
initContainerRadiusSearch("0 0 0", %i, $TypeMasks::All);
%lastPos = "0 0 0";
while((%target = ContainerSearchNext()) != 0)
{
%ray = containerRayCast(%lastPos, %target.getPosition(), $TypeMasks::All, %target);
%lastpos = %target.getPosition();
switch(getWord(%ray, 0))
{
default:
continue;
}
}
doNothing(%i - 1);
}