View Single Post
  #31  
Old 08-31-2003, 07:04 PM
Knuckles Knuckles is offline
Registered User
Join Date: Sep 2002
Location: New York
Posts: 580
Knuckles is on a distinguished road
Send a message via AIM to Knuckles
Quote:
Originally posted by Spark910

...
NPC Code:

if(playertouchsme) {
sleep 2;
setplayerprop #c,Oh, it waited 2 seconds before it set this message!;
}


..This would pause the WHOLE script for 2 second, and then move on.

With timeout, it doesnt pause the script. It continues on.
NPC Code:

if(created) {
timeout = 3;
sleep 1; // 1st second
setplayerprop #c,1;
sleep 1; // This would be the 2nd second
setplayerprop #c,2;
}

if(timeout) setplayerprop #c,3; // On the 3rd second do this.


it will do the first 2 commands (setting playerprop, because those are done within the first 2 seconds. And then it will call the timeout, and do whatevers in there.)

I think I explained it right.. it might be alittle confusing though ^_^.
__________________
Knuckles
"They say 60% of the time, it works everytime!"
Reply With Quote