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 =/