Page 1 of 1

is there a way to pause(PauseGame funtion)only certain actor

PostPosted: Wed Jan 24, 2007 1:25 am
by Sgt. Sparky
-s for example: only pauseing the main moving actor and a few others, ro pauseing all actors exept a few :D just curious :D

PostPosted: Wed Jan 24, 2007 2:09 am
by Game A Gogo
nope

PostPosted: Wed Jan 24, 2007 2:20 am
by Sgt. Sparky
:shock: Are you sure? :(

PostPosted: Wed Jan 24, 2007 10:55 am
by Fuzzy
Give the actors a variable called pause. Initialize it to 1 when the actor is created. Then you use a keypress event with that actor. when the key is pressed, set the pause variable to 0 or set it to 1 if it is already 0.

In the code where the actors velocity is set multiply the velocity by pause. If the actor does anything like shooting, check pause before allowing that.

It works just like the variable that prevents someone from jumping twice in the air.

Read my post here for a better idea of how to make it work.

http://game-editor.com/forum/viewtopic. ... eld+sheild

PostPosted: Sat Jan 27, 2007 3:09 pm
by Sgt. Sparky
positive Score for you! thanks :D