Blockland Forums
Home
Help
Login
Register
Blockland Forums
»
Blockland Forums
»
Modification Help
»
How does one go about making a console command repeat until cancelled?
« previous
next »
Print
Pages: [
1
]
Author
Topic: How does one go about making a console command repeat until cancelled? (Read 550 times)
Wynd_Fox
November 23, 2009, 08:13:07 PM
This may go in help, but it doesn't seem like it would... Any help would be greatly appreciated.
Ad Bot
Advertisement
Plornt
November 23, 2009, 08:16:10 PM
function A()
{
if($A==1)
{
schedule(DELAY,0,a);
}
}
function Tog()
{
if($A==0)
{
$A=1;
a();
}
else
{
$a=0;
}
}
Wynd_Fox
November 23, 2009, 08:17:09 PM
What's A in that?
Truce
November 23, 2009, 08:32:03 PM
This would be the setup to repeat talking Hello! every 1000 ms (1 second):
Code:
[Select]
function rc() { talk("Hello!"); $rc = schedule(1000,0,rc); }
To start it:
Code:
[Select]
rc();
To stop it:
Code:
[Select]
cancel($rc);
Kyzor
November 24, 2009, 01:06:47 AM
Thanks Truce, that was just what I needed.
Print
Pages: [
1
]
« previous
next »
Blockland Forums
»
Blockland Forums
»
Modification Help
»
How does one go about making a console command repeat until cancelled?