Alice Community  

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

Reply
 
Thread Tools Display Modes
How Do I successfully create a counter? Why does my collision detection not work?
Old
sorenkahl
Junior Member
 
Status: Offline
Posts: 5
Join Date: Dec 2014
Location: Elk Grove, CA
Default How Do I successfully create a counter? Why does my collision detection not work? - 12-09-2014, 03:20 PM

I am doing a final project for school and I can't figure out how to get my counter to work properly. When I go to play the world it already counts. Am I using wrong codes to get this to work properly? Any advice would be helpful. I am including my world. The method I am using is located in the world methods. It's called CheckForBroccoli. Also how do I get my bunny to stop going into the ground? My collision detection code isn't working properly.

Thanks for the Help,

sorenkahl
Attached Files
File Type: a2w Kahl_Final.a2w (2.72 MB, 3 views)
   
Reply With Quote
Here a Fix
Old
RavenOfCode
Senior Member
 
RavenOfCode's Avatar
 
Status: Offline
Posts: 409
Join Date: Oct 2013
Location: Northern Virginia
Default Here a Fix - 12-09-2014, 04:36 PM

Heres a fix for your final as best as I understand it.

What I changed is listed in myfirstmethod near the bottom.

Hope this helps!
RavenOfCode
Attached Files
File Type: a2w Kahl_Final_Updated Guide.a2w (2.05 MB, 13 views)


Stuff + Other Stuff + Different Other Stuff = Things :)

My best Alice game:

Clash of the Cubes (an arena fighting game):
http://www.alice.org/community/showthread.php?t=10738&highlight=game
   
Reply With Quote
Thanks
Old
sorenkahl
Junior Member
 
Status: Offline
Posts: 5
Join Date: Dec 2014
Location: Elk Grove, CA
Default Thanks - 12-09-2014, 09:26 PM

Hey Thanks for the help if I have any more questions I'll be sure to post them

-sorenkahl
   
Reply With Quote
Heres a fix
Old
RavenOfCode
Senior Member
 
RavenOfCode's Avatar
 
Status: Offline
Posts: 409
Join Date: Oct 2013
Location: Northern Virginia
Default Heres a fix - 12-11-2014, 04:19 PM

Here's the way to make the broccoli align correctly.

It used a variable and a do in order.
Attached Files
File Type: a2w Kahl_Final_Updated Guide2.a2w (2.24 MB, 4 views)


Stuff + Other Stuff + Different Other Stuff = Things :)

My best Alice game:

Clash of the Cubes (an arena fighting game):
http://www.alice.org/community/showthread.php?t=10738&highlight=game
   
Reply With Quote
Still Not Working Why?
Old
sorenkahl
Junior Member
 
Status: Offline
Posts: 5
Join Date: Dec 2014
Location: Elk Grove, CA
Default Still Not Working Why? - 12-15-2014, 11:50 PM

I've copied all of your work onto my new updated world and I'm having some major bugs what did I mess up on?

Thanks
-sorenkahl
Attached Files
File Type: a2w Kahl_Final New.a2w (10.50 MB, 11 views)
   
Reply With Quote
Simply Fix
Old
RavenOfCode
Senior Member
 
RavenOfCode's Avatar
 
Status: Offline
Posts: 409
Join Date: Oct 2013
Location: Northern Virginia
Cool Simply Fix - 12-16-2014, 05:21 AM

You didn't copy the code right, put the IncrementDistanceBy1 into the forAllInOrder. As that makes it increment every time a broccoli moves, not after they all move.


Stuff + Other Stuff + Different Other Stuff = Things :)

My best Alice game:

Clash of the Cubes (an arena fighting game):
http://www.alice.org/community/showthread.php?t=10738&highlight=game
   
Reply With Quote
Reply


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