Page 1 of 1

pause

PostPosted: Wed Jun 23, 2010 2:05 pm
by Scorpion50o1
simple way to pause a game without pausing a pause menu or something
ok first off make a variable called pause> ok make a pause menu or something> you only want you actor to be paused not the pause menu so go to ur actor(s) go to draw actor>script editor and put this code

if
(pause==0);
EventEnable("Event Actor", EVENTALL);
if
(pause==1);
EventDisable("Event Actor", EVENTALL);

ok now only that actor will be paused(copy and paste that code to every actor u want that to apply to)
now go to ur pause menu button and go to mouse button down event> left or right click (doesnt matter) now go to script editor
and type

pause=1;

ok now for this u need a resume game button on ur pause menu and go to mouse button down event> left or right button> script editor type this in

pause=0;

Re: pause

PostPosted: Wed Jun 23, 2010 2:27 pm
by Bee-Ant
This wont work...
Just after it set :
Scorpion50o1 wrote:EventDisable("Event Actor", EVENTALL);

It won't accept any action from any event anymore...
So, although you've set :
Scorpion50o1 wrote:EventEnable("Event Actor", EVENTALL);

It wont return itself to enable state, because DrawActor is already disabled...

The right way is to use this code :
Code: Select all
if(pause==1)
{
    directional_velocity=0;
    ChangeAnimationDirection("Event Actor", STOPPED);
}
else
{
    ChangeAnimationDirection("Event Actor", FORWARD);   
}

:D

Re: pause

PostPosted: Wed Jun 23, 2010 3:26 pm
by Hblade
PauseGameOn() ftw? o.o

Re: pause

PostPosted: Wed Jun 23, 2010 3:34 pm
by Scorpion50o1
then u cant do anything without unpausing this is for pausing certain actors

Re: pause

PostPosted: Wed Jun 23, 2010 3:35 pm
by Hblade
oh :P