Reference |
Removes all threads/calls in the cog "thread stack" except the current one. Thus, only the current thread will continue to run.
Syntax:
Reset();
Reset() will allow infinite loops, so be careful.
For example,
loop: Print("Hi"); call loop; Return;
loops 5 times then terminates.
but
loop: Print("Hi"); Reset(); call loop; Return;
creates an infinite loop and locks up Jedi Knight. A recursive loop can be used, provided there is a condition inside that terminates it.