Graal Forums  

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

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 07-06-2003, 05:55 PM
Spark910 Spark910 is offline
Ex-Graal Global
Spark910's Avatar
Join Date: Oct 2001
Location: England
Posts: 10,892
Spark910 has a spectacular aura about
Quote:
Originally posted by GoZelda
Okay...
timeout = 1;
this means that after 1 second, timeout is set.
then you can use
if (timeout){
//whatever you want;
}
clear?
and inside timeout you can do anoter timeout.

Its useful as sleep does just that, sleep! So if you want to wait a certain time and trigger something, then timeout is good as sleep wont take any extra commands until its 'woke-up'.

So you can do:
NPC Code:

if (created) {
if (timeout) {
//yup;
}

timeout=1;
}




So it goes down when it reads it, asks if 'timeout' is set, and at first it is not, so it ignores all in the timeout part. It then goes down and sees that the timeout is set to 1.

Then it starts at the top again, reads down, this time timeout is set (to 1), so anything inside that is executed, and it will continue as it will go down and read timeout=1; again!

Prob Wrong =/
__________________
--Spark911
Reply With Quote
Reply


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 06:45 PM.


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