Quote:
Originally Posted by Evil_Trunks
I think the real problem here is that when he does sleep, the timeout is completed immediately? In any case, it's better not to mix timeouts and sleeps.
I don't think you really understand how scripts work, looking at your explanation.
|
His problem was that after the sleep it went to the timeout portion. In his script, the timout = # part, basically only set the standards for the if (timeout). The only thing that actually "paused" the script would be the sleep. He wanted his npc to sleep for 10 seconds before performing the timeout, which is what I did with my script. I kept it simple, since what he's trying to do (as in what he wants the npc to do) is simple.
In other words, how he had scripted it, he thought that the timeout = # would make the npc "pause" for the amount indicated, but in fact, it didnt matter at all what that number was. What mattered was the number in the sleep. He had sleep 0.5, which is why the npc immediately triggered the timeout right after the sleep. I understand what his problem was (from what he's said). Of course, there is better ways to do it, as indicated by Cheetos, but it doesnt make mines wrong.