Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #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
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 05:39 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.