Alice Community

Alice Community (http://www.alice.org/community/index.php)
-   How do I...? (http://www.alice.org/community/forumdisplay.php?f=16)
-   -   How do i Make a replay or start option for game?? (http://www.alice.org/community/showthread.php?t=6747)

fatmansam 06-13-2011 01:53 AM

How do i Make a replay or start option for game??
 
How do i Make a replay option for game??

I already have a thing to click, but how do i get the world to stop all to gether???

sfunk 06-13-2011 03:05 PM

well you will have to just make everything reset in your restart method,I use to use dummy objects on every thing could move in my games, and when I had it restart it would reset back to those objects

legolizard 06-13-2011 03:57 PM

To start your game, I would suppose you mean by clicking the button. If so then you would create the event "when the mouse is clicked on "said object" do and then call the required game method or methods. Otherwise could you elaborate a little bit more.:confused:

jediaction 06-13-2011 04:03 PM

If you mean restart by "restart the application" then that is not possible with normal Alice. It might be possible with Jython scripting though(I don't know much about Jython so to find that out, talk to Arty-fishL). You can make positions reset with button clicks and when the button is clicked, all the object move to there origional positions and then the method restart. But, it all matters on how you make your game and what kind of game it is. Hope this helps

David B 06-13-2011 04:48 PM

My suggestion to you would be to just use the if/else method and ask the user if they want to play again. If they do, just start the code for the game back up again. (If you don't know what I am talking about, just say so, and I will make an example program.)

jediaction 06-13-2011 05:27 PM

Thats why I said, it depends on how you made your game and what kind of game it is...

David B 06-13-2011 05:36 PM

[QUOTE=jediaction;37380]Thats why I said, it depends on how you made your game and what kind of game it is...[/QUOTE]

I think I found the way you said it too confusing, which is why I said it again.

jediaction 06-13-2011 06:28 PM

OK, but I said it now...haha


All times are GMT -5. The time now is 03:51 PM.

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