View Single Post
  #6  
Old 08-22-2003, 12:11 AM
Riot-Starter Riot-Starter is offline
Registered User
Join Date: Aug 2001
Location: Central Florida, USA
Posts: 79
Riot-Starter is on a distinguished road
Send a message via AIM to Riot-Starter
Quote:
Originally posted by marcoR
sleep is a pause in the script, for as long as you tell it to, timeout is a loop. e.g.:

NPC Code:


if (created){ //starts a code block
timeout=0.05; //this sets the loop refresh;
} //ends a code block

if (timeout)//this begins the loop{ //starts a code block
message Fat People; //the NPC says Fat People
sleep 0.5; //sleeps half a second
message Skinny People; //the NPC says Skinny People
timeout=0.05; //this completes the loop
} //ends a code block




A sleep

NPC Code:


if (created)//if the NPC is created{ //starts a code block
message Fat people; //the NPC says Fat People
sleep 2; //pauses 2 seconds
message Skinny People; //the NPC says Skinny People
} //ends a code block


Dont use "//" comments then put {, it's the same as not putting it at all. Drop it down to the next line
Reply With Quote