COG Verb - Sleep

Pauses code execution for the given delay (in seconds). The next line of code will not run until the delay has ended. Syntax:

  Sleep(flex_delay);

Note that you may not have more than four simultaneous sleeps in a cog. Some example code with Sleep():

    activated:
       if(on) Return;
       on=1;
       PlaySoundLocal(wav, 1, 0, 0);
       Sleep(GetSoundLen(wav));
       on=0;
    Return;
  • Create:
This page was last modified 11:52, 1 August 2007.   This page has been accessed 627 times.