Alice Community  

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

Reply
 
Thread Tools Display Modes
Need help regarding events
Old
Kimura
Junior Member
 
Status: Offline
Posts: 4
Join Date: Dec 2012
Default Need help regarding events - 12-13-2012, 06:43 PM

Hey guys, I am doing a project for school and need help. Basically, I am trying to make it so my astronaut hops around on the moon until he reaches the spheres. My if/else statement has an issue. If astronaut is within 5 meters of helium3red1, then sphere will not show. Else: every sphere continues to show. My world is not set up for completion right now, it is in a testing state, so that is why if he gets close to helium3red1, every other sphere will not show.

My theory is that the if/else will not work based on the aftermath of a driven event, such as a typed key like I have. How can I move my astronaut while still affecting the within 5 meter threshold? Thank you, I attached my project.
Attached Files
File Type: a2w astronaut.a2w (2.12 MB, 0 views)
   
Reply With Quote
Old
Kimura
Junior Member
 
Status: Offline
Posts: 4
Join Date: Dec 2012
Default 12-13-2012, 07:16 PM

I am getting closer. I inserted a while statement. Notice that when you move the loop statement to trash in the "HeliumAnim" Method, that the spheres work as I intended, the astronaut moves 5 meters within and they disappear. When the loop is in this statement, they do not disappear. I want the loop because it makes the spheres change from red to yellow. I attached my revised world. Please help, I am sure it is something simple I am missing!
Attached Files
File Type: a2w astronaut.a2w (2.14 MB, 0 views)
   
Reply With Quote
Old
Kimura
Junior Member
 
Status: Offline
Posts: 4
Join Date: Dec 2012
Default 12-13-2012, 09:30 PM

Ok this is as far as I got today. I no longer care about the changing colors, I just want my astronaut to collect all the heliums, return to the ladder, and when he gets to it, Alice becomes visible and hands him a prize (SeeAlice method will ensue when astronaut is within x meters of sphere2, which is an invisible dummy object). I know that it's gotta have something to do with the while something is true event (begin during end). I tried them all and I still get stuck. Again, I have attached my revised world. Sorry if I am posting to much but this is driving me crazy and it is due in 4 days and I am trying to simplify this as much as possible.
Attached Files
File Type: a2w astronaut.a2w (2.14 MB, 2 views)
   
Reply With Quote
Old
Kimura
Junior Member
 
Status: Offline
Posts: 4
Join Date: Dec 2012
Default 12-14-2012, 12:08 AM

Well I figured it out because I would not let myself give up, it was driving me nuts I couldn't sleep! I made a while something is true event, and made it so when the astronaut was in front of something, a certain method would take place, which was Alice handing the astronaut a prize.

There were still some things I wanted to do but I couldn't end up finding a way to do, and a few glitches that could take place if one does not follow the instructions thoroughly during the game, but hey, every game has glitches, right? Just letting you guys know that I am done with that exercise and I realized tonight that there is more than one way to do something. After I stopped trying to fix one thing that didn't work over and over again, and tried something new and different, the majority of the time, that is how I found success. Attached is my finished product.
Attached Files
File Type: a2w astronaut.a2w (2.17 MB, 3 views)
   
Reply With Quote
Old
HaloMike117
Junior Member
 
Status: Offline
Posts: 8
Join Date: Dec 2012
Default 12-15-2012, 08:08 PM

Quote:
Originally Posted by Kimura View Post
Well I figured it out because I would not let myself give up, it was driving me nuts I couldn't sleep! I made a while something is true event, and made it so when the astronaut was in front of something, a certain method would take place, which was Alice handing the astronaut a prize.

There were still some things I wanted to do but I couldn't end up finding a way to do, and a few glitches that could take place if one does not follow the instructions thoroughly during the game, but hey, every game has glitches, right? Just letting you guys know that I am done with that exercise and I realized tonight that there is more than one way to do something. After I stopped trying to fix one thing that didn't work over and over again, and tried something new and different, the majority of the time, that is how I found success. Attached is my finished product.
Awesome.

Glad to see you got things sorted! (:
   
Reply With Quote
Old
mcelroy32400
Junior Member
 
Status: Offline
Posts: 7
Join Date: Sep 2012
Default 12-18-2012, 05:11 PM

Quote:
Originally Posted by Kimura View Post
...Ok this is as far as I got today. I no longer care about the changing colors, I just want my astronaut to collect all the heliums....
I laughed when I read this sentence. Anyone who has put some good effort into any Alice program totally knows that feeling of "Ok, forget it. I wanted to add something really cool to my thing so the program would be really nice like I imagined, but the piece of garbage won't work - so just forget it. I don't care anymore. I just need to make the actual thing work now."

Interesting little game. I like the prize at the end. In the future, for game-play sake you might want to speed things up; instead of 2 seconds for up and 2 for down (totaling 4), maybe just do .5 seconds for each. This still gives the slow motion of moon bouncing but speeds the game up. Another suggestion, change your events from "When a key is typed" to "While a key is pressed" (right click the event and choose 'change to' option) - this way the user can just hold a key down and the method will be called over and over until the user stops pressing the key. Overall, good little 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.