Alice Community  

Go Back   Alice Community > Alice 2 > How do I...?

Reply
 
Thread Tools Display Modes
how do i put in pause button
Old
lowrider001
Member
 
lowrider001's Avatar
 
Status: Offline
Posts: 22
Join Date: Nov 2009
Smile how do i put in pause button - 12-26-2009, 01:39 PM

i want to put in a button into the world that will pause the game i am aware of the one at the top of the screen when you start the world but i need one so i can put in a upgradeing screen and such and not get killed by the enemies.

any help will be appricated
   
Reply With Quote
World speed
Old
zonedabone
Senior Member
 
zonedabone's Avatar
 
Status: Offline
Posts: 577
Join Date: Nov 2008
Location: In the interwebs
Lightbulb World speed - 12-27-2009, 05:24 PM

What you probably want to do is first create a trigger, be it an object to click or a key to press. When this trigger is activated, have the world property "Speed" be set to 0. This will cause the world to pause and as far as I know, any actions that are set to take 0 time will still run. You can have all thoe actions happen and all is well. To have the world run normally again, simply set the world speed to 1.

More info once I install Alice on this crummy computer that I'm being forced to use.


'Apple Macintosh' - An anagram of 'Complaints Heap'

M.A.C.I.N.T.O.S.H. - Machine Always Crashes, If Not, The Operating System Hangs.

You're *such* a mac person.
   
Reply With Quote
Old
dubastot
Senior Member
 
dubastot's Avatar
 
Status: Offline
Posts: 661
Join Date: Apr 2009
Location: Two Steps From Hell
Default 12-27-2009, 08:21 PM

Set the function called speed multiplier to 0 in order to pause the game; you can find it in the "seldom used properties" tab.
   
Reply With Quote
Old
lowrider001
Member
 
lowrider001's Avatar
 
Status: Offline
Posts: 22
Join Date: Nov 2009
Default 12-29-2009, 03:15 PM

its not going back to one. i have the duration set to 0 but still nothing is working.... i no the guy who made resident penguin made a pause but i dont understand how he did it.
   
Reply With Quote
Old
x2495iiii
Super Moderator
 
x2495iiii's Avatar
 
Status: Offline
Posts: 3,508
Join Date: Dec 2008
Location: Somewhere in the Continental U.S.
Default 12-30-2009, 06:06 PM

I put an if/else if statement at the beginning of almost every event which prevented any action from taking place if certain boolean variables were true.

If stop (meaning if the boolean variable called "stop" has been set to true)
[do nothing]
else
[motion sequence]


Also, the speed multiplier thing could probably work too, and possibly better than my method, though you'd still need an if/else if statement to stop some things from happening (like my penguin turning, since that happens over a duration of 0 seconds, but in tiny increments so it looks like smooth animation).

Finally, make sure if you use the speed multiplier method that you have two separate statements: one which sets the world's speed multiplier to 0 in 0 seconds at the start of the pause menu, and one which sets it to 1 in 0 seconds at the end of the pause menu.


(')>
   
Reply With Quote
Old
lowrider001
Member
 
lowrider001's Avatar
 
Status: Offline
Posts: 22
Join Date: Nov 2009
Default 01-04-2010, 10:38 AM

o so thats how u did it i tryed looking at urs to figure it out but couldnt but thax ill do it the way u did cuse it works great
   
Reply With Quote
Old
jediaction
Senior Member
 
jediaction's Avatar
 
Status: Offline
Posts: 5,064
Join Date: Jul 2009
Location: Bel Air, Maryland
Default 01-06-2010, 08:21 PM

Exactly what he said, i knew that...(not really)


Website: www.salokingames.com
FaceBook: www.facebook.com/SalokinGames
   
Reply With Quote
Old
lowrider001
Member
 
lowrider001's Avatar
 
Status: Offline
Posts: 22
Join Date: Nov 2009
Default 01-08-2010, 11:59 AM

Quote:
Originally Posted by jediaction View Post
Exactly what he said, i knew that...(not really)
what lol??
   
Reply With Quote
Old
shares
Guest
 
Status:
Posts: n/a
Default 01-17-2010, 07:34 PM

I've also been trying to do this in my game
and the pausing part works ( When P is typed setspeedmultiplierto0 duration:0)
but when i want to make the world continue
( When s is typed setspeedmultiplierto1 duration:0)
it wont work :S

can anyone help?
   
Reply With Quote
Old
x2495iiii
Super Moderator
 
x2495iiii's Avatar
 
Status: Offline
Posts: 3,508
Join Date: Dec 2008
Location: Somewhere in the Continental U.S.
Default 01-17-2010, 08:11 PM

I tested it and setting the speed multiplier to 0 basically freezes the world, as no other actions can be performed. Instead, set the number to something very close to zero (I used .00001) and the rest will work.


(')>
   
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



Copyright ©2023, Carnegie Mellon University
Alice 2.x © 1999-2012, Alice 3.x © 2008-2012, Carnegie Mellon University. All rights reserved.