![]() |
Whats the differance between timeout and sleep?
Sleep seems to stop the npc, timeout seems to do nothing, and also gani's wont play for me, how do I get a dang gani to play ?
|
Sleep pauses the script for a certain time. Timeout is a countdown.
|
So like if I do timeout=10 it will keep going with the script but nothing will happen when timeout is finished therefore making timeout utterly useless ?
|
Timeout waits the given seconds then calls to the "timeout" statement without stoping the script.
Sleep delays execution. as for ganis: Make shure you have the .gani extension on the filename and use setani gani name w/o .gani,params; |
sleep is a pause in the script, for as long as you tell it to, timeout is a loop. e.g.:
NPC Code: A sleep NPC Code: this is as far as my feeble mind understands this exact script, tho my wording probably isn't great. (i tried tho) |
Quote:
|
... I was just trying to make it easy for him to understand.
|
Just sayin something, if he copies and pastes:
"Error: Unknown command: }" |
well if he does copy and paste it, i'll break his thumbs, because I have that exact script copyrighted
|
I seriously doubt you can copyright such a simple script:p
|
timeout is not a loop unless you make it a loop
NPC Code: This accomplishes the same thing as NPC Code: but at the same time, isn't a loop. Like Kiirar said above, timeout is litterally a countdown the command NPC Code: does the equivelent to message of the time it has until the timeout event is called |
About the Gani's, what are params for? Btw read my post under playerworlds era about banned. see how pissed off i am, 3 p2p accounts, grr.
|
Read the gani forum.
|
params = #p
:P |
Timeout is an invisible flag that is 'created' when the timeout count reach 0. Another example:
NPC Code: When timeout be 0,it will 'create' the flag and will execute the code inside that timeout block. By the way,Kaidaman,timeout & sleep aren't the same thing and won't execute the same thing as you said. |
Unless I didnt read it, I think you all missed out the big part.
NPC Code: You touch it, you wait until 2 before it hides, it does not execute ANYTHING until it has waken from sleep. So it wont do anything until it stops sleeping. NPC Code: If I keep touching it, the timeout will go back to 2. But sleep will not, as it is asleep and can not take any more commands. If its not correct what I have said, then its because im not a scripter. |
i'm not a scripter either, that's all right, but i've never looked at it that specific way.. kinda like it
|
Osrs, you obviously failed to read correctly what I had said because the thing is that what I had said was correct and in that particular case, would do the same thing as a sleep, save for the very valid point spark pointed out.
|
Important point: On a lower level, sleep basically just makes a note of where the instruction counter is and sets a timeout, then jumps to the same place when the timeout occurs. People often try to combine the two (never a good idea) and end up going crazy.
|
Quote:
I understand what you had said,it will execute the same effect on script,but won't work same... |
Quote:
If you don't know what timeout does, don't say it is useless, it makes you look like an idiot. |
| All times are GMT +2. The time now is 01:02 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.