Alice Community

Alice Community (http://www.alice.org/community/index.php)
-   Share Worlds (http://www.alice.org/community/forumdisplay.php?f=6)
-   -   a junk game (http://www.alice.org/community/showthread.php?t=2649)

m9jacoll 05-12-2009 05:15 PM

a junk game
 
1 Attachment(s)
whack a mole

Scott300 05-12-2009 07:46 PM

1 Attachment(s)
Wow very nice job on this! Sorry to sound like a jerk for pointing this out, but part of programming is learning to think out side the box on what could happen so here is a couple things to look at in your program (don't get me wrong its great!)

1.Moles in the whole can be clicked on for score to fix this when a mole is chosen and pops up set a variable with the mole that was selected and on the score make it so if current_mole == clicked_on_mole than increase score

2.With the way score was set up you would click on it 1 time and it would set it to 0, with the way you have it made all you had to do was set the default score to 1 so when it first updates it it will display 1.

I uploaded a version with my 2 fixes on it so you can see what I mean.

Dameria 11-27-2012 08:15 AM

[QUOTE=fieldhchick14;51671]How can i get the yellow to turn red when its full?[/QUOTE]

Have you tried putting "playerScore set color to (red)" after the while loop in "my first method"? So basically after the cylinder is above the ground, it will stop popping moles up and it will then run the code to turn the cylinder red.

Also, there is an error that occurs occasionally during the game. It's because your "Moles" array does has two "null" objects. You can't pass a null object into your method and expect it to do actions, it won't work. You should put all the null objects to the bottom of the list and then remove them. Also, you're missing a 12th mole. After you fix all this it should work.

fieldhchick14 11-27-2012 01:45 PM

Thanks that worked!


All times are GMT -5. The time now is 07:33 PM.

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