Page 1 of 1

pause/continue thread

Posted: Tue Jul 12, 2005 2:41 am
by tsensor
i need stop thread and continue thread method

it is must start at paused part







+ps. im not in country that main language english. and not study hard english. so not good (bad)at english. understand me
:wink:

Posted: Tue Jul 12, 2005 4:55 am
by lizardkid
theres no function for it, but whenever i need to do that i do something like this

Code: Select all

// code before
while(level.pauseThread == 0)
{
wait 1
}
// more code

Code: Select all

level.pauseThread = 1

Posted: Tue Jul 12, 2005 9:47 am
by Elgan
would it not be better to exit and start again.

Posted: Tue Jul 12, 2005 4:49 pm
by lizardkid
no, not really. i gather he has it setup like this..

Code: Select all

myThread:
// code

// pause

// code AFTER something userdefined happens