Alice Community  

Go Back   Alice Community > Alice 2 > Share Worlds

Reply
 
Thread Tools Display Modes
a junk game
Old
m9jacoll
Guest
 
Status:
Posts: n/a
Default a junk game - 05-12-2009, 06:15 PM

whack a mole
Attached Files
File Type: a2w whack_a_mole2.a2w (3.03 MB, 263 views)
   
Reply With Quote
Old
Scott300
Senior Member
 
Status: Offline
Posts: 80
Join Date: Feb 2009
Location: Ohio
Default 05-12-2009, 08:46 PM

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.
Attached Files
File Type: a2w whack_a_mole2.a2w (3.04 MB, 194 views)
  Send a message via AIM to Scott300 Send a message via MSN to Scott300  
Reply With Quote
Old
Dameria
Senior Member
 
Dameria's Avatar
 
Status: Offline
Posts: 978
Join Date: Sep 2009
Location: United States
Default 11-27-2012, 09:15 AM

Quote:
Originally Posted by fieldhchick14 View Post
How can i get the yellow to turn red when its full?
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.


Check out my best projects so far and please comment:

Tic-Tac-Toe 2.0 ................... http://www.alice.org/community/showthread.php?t=3548
Alice Paint ........................... http://www.alice.org/community/showthread.php?p=23408
Real-Time Clock .................. http://www.alice.org/community/showthread.php?p=12725
Maze Game ......................... http://www.alice.org/community/showthread.php?t=4301

Last edited by Dameria; 11-27-2012 at 09:44 AM.
   
Reply With Quote
Old
fieldhchick14
Junior Member
 
Status: Offline
Posts: 1
Join Date: Sep 2012
Default 11-27-2012, 02:45 PM

Thanks that worked!
   
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 ©2019, Carnegie Mellon University
Alice 2.x 1999-2012, Alice 3.x 2008-2012, Carnegie Mellon University. All rights reserved.