Blockland Forums > Modification Help
Time event?
<< < (2/2)
David819:
Im not asking for the events or burn script,im asking how do i do the timed event script that activates a function and de-activates it after the time ends.
phflack:
deactivates a function... like stopping a loop? or making it so the function doesn't work?

stopping loop:

--- Code: ---function quack()
{
  cancel($quack);
  echo(QUACK);
  $quack = schedule(500, 0, quack);
}

function noquack()
{
  cancel($quack);
}

--- End code ---

disabling functions

--- Code: ---$quack = true;
function quack()
{
  if(!$quack)
    return;
  echo(QUACK);
}

function noquack()
{
  $quack = false;
}

function togquack()
{
  $quack = !$quack;
}

--- End code ---
Navigation
Message Index
Previous page

Go to full version