COG Verb - Reset

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.

  • Create:
This page was last modified 18:19, 28 August 2007.   This page has been accessed 1,442 times.