Post: How to use while?
05-12-2015, 09:29 PM #1
(adsbygoogle = window.adsbygoogle || []).push({}); I want to make a thread that looks something like this:

     
Thread()
{
self endon ("disconnect");
for(;Winky Winky
{
while (self usebuttonpressed())
{
self UFO(); // While use button pressed it goes on UFO
}
self notify ("EndUFO"); // When use button is released notify end ufo to stop the ufo thread
wait 0.01;
}
}


Am I doing something wrong?
(adsbygoogle = window.adsbygoogle || []).push({});
05-17-2015, 12:15 AM #2
Why are you trying to create two threads? Just have the one UFO thread and use a Boolean check for if the button is pressed, if it is true, execute your ufo code, then wait so the end of the loop.
    
self thread UFO();

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo