pause/continue thread

Post your scripting questions / solutions here

Moderator: Moderators

Post Reply
tsensor
Sergeant
Posts: 52
Joined: Wed Feb 11, 2004 1:25 pm

pause/continue thread

Post 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:
lizardkid
Windows Zealot
Posts: 3672
Joined: Fri Mar 19, 2004 7:16 pm
Location: Helena MT

Post 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
Moderator

۞
Abyssus pro sapientia
Olympus pro Ignarus
۞

AND STUFF™ © 2006
Elgan
Lieutenant General
Posts: 890
Joined: Tue Apr 13, 2004 10:43 pm
Location: uk
Contact:

Post by Elgan »

would it not be better to exit and start again.
lizardkid
Windows Zealot
Posts: 3672
Joined: Fri Mar 19, 2004 7:16 pm
Location: Helena MT

Post by lizardkid »

no, not really. i gather he has it setup like this..

Code: Select all

myThread:
// code

// pause

// code AFTER something userdefined happens
Moderator

۞
Abyssus pro sapientia
Olympus pro Ignarus
۞

AND STUFF™ © 2006
Post Reply