Alice Community  

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

Reply
 
Thread Tools Display Modes
Ask to play again?
Old
tanya
Guest
 
Status:
Posts: n/a
Default Ask to play again? - 12-11-2010, 10:22 PM

Hello everyone,

I created a game, and now I need to ask if the user wants to play again. I know how to ask a question, would you like to play again. I just do not know how to make the game play again if the user clicks yes.

I need to finish my game by Monday.
Any help is greatly appreciated.
   
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-12-2010, 08:17 PM

You might need a boolean that will set to true (or false) when the user says yes and then have your world's method(s) restart.


I'm a web developer/ designer now.
   
Reply With Quote
Old
tanya
Guest
 
Status:
Posts: n/a
Default 12-13-2010, 11:47 AM

Thanks so much!

I created a variable playAgain
playAgain... set value to... ask user for yes or no.... question=Do you want to play again?
If playAgain == true

I'm not sure how to restart the game if user clicks "yes" (first scene does not appear). I have several events and methods.
Can you help with this please?

Thank you.
   
Reply With Quote
Old
Revolt
Member
 
Revolt's Avatar
 
Status: Offline
Posts: 33
Join Date: Oct 2010
Question 12-14-2010, 08:49 PM

Assuming you have a "Set camera POV to ___" and a "Start ____" in your main method (pretty much moves everything to its correct location), you could just make a method "Restart" that sets all objects to their respective dummies (AKA their locations).

If not, then I'm not really sure of another way (well, another simple one anyway)
Hope that helps in some way...
   
Reply With Quote
Old
David B
Senior Member
 
David B's Avatar
 
Status: Offline
Posts: 1,145
Join Date: Dec 2010
Location: N/A
Default 12-14-2010, 09:00 PM

Quote:
Originally Posted by tanya View Post
Hello everyone,

I created a game, and now I need to ask if the user wants to play again. I know how to ask a question, would you like to play again. I just do not know how to make the game play again if the user clicks yes.

I need to finish my game by Monday.
Any help is greatly appreciated.
If you upload it, I will add comments to it that will explain what to do. After I make the comments, I'll re-post it here.
   
Reply With Quote
Old
tanya
Guest
 
Status:
Posts: n/a
Default 12-15-2010, 08:33 AM

Thanks so much
I started a thread yesterday in the section "How do I...," and the problem was solved by haven812.
http://www.alice.org/community/showthread.php?t=5694
   
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 ©2021, Carnegie Mellon University
Alice 2.x 1999-2012, Alice 3.x 2008-2012, Carnegie Mellon University. All rights reserved.