Solvedrunning multiple threads at once?

Posts 12 of 2 · Page 1 of 1
running multiple threads at once?
EDITED:

hey,
im trying to create my own gamemode, and one of the problems I have is trying to delete my crates in one thread from a completely different one. When I use the "waitill" command, it stalls up some other threads I need to run. So are there any other ways to delete crates from other threads besides "waitill"?

and the same HUD elements from other threads? Like if i create a progress bar in one thread, then I try and make a conditional statement in another thread to delete the progress bar, I get an "uninitialized variable 'progress bar'" error. Any way around that without using "waittill"
Use the entity. prefix on any variables to access the thingy from any thread.

Example:
Code:
doSpawn()
{
    self thread doCrap1(); //When this is run, self.someThing is initialized
    self thread doCrap2(); //By the time it runs this, it should be able to access self.someThing since it's a 'global variable'
}

doCrap1()
{
    self.someThing = 1;
}

doCrap2()
{
    self iPrintLnBold(self.someThing);
}
/marked as solved

If you need to ask anymore questions or need something to be cleared let me know otherwise, tell me to close the thread.
Posts 12 of 2 · Page 1 of 1
This thread is closed for replies.

Tags for this Thread

None

Need help?