Alice Community

Alice Community (http://www.alice.org/community/index.php)
-   How do I...? (http://www.alice.org/community/forumdisplay.php?f=16)
-   -   How to put object above group? (http://www.alice.org/community/showthread.php?t=9314)

Sinaptic 06-20-2012 10:20 PM

How to put object above group?
 
1 Attachment(s)
i'm having a problem with a small project i'm working on in alice.

it's sort of a maze where a frog must make its way to the other side of the water by walking across a group of turtles. (picture attached)

i was wondering how i would go about making it so if the frog is not above a turtle, the game would end/restart.

okyloky9 06-20-2012 10:48 PM

I'm not COMPLETELY sure about this, but if you make an If/Else statement doing
if "frog" is "0.01" meters within "lake/water (whatever it is)"
Do "world.restart" (world.restart being a variable)
Else do nothing.
"world.restart" would be the frog restarting to the rock. So what you would do is create what is a called a "dummy object" (These, my friend, are life savers.) and place the dummy object on the rock. Have "world.restart" do this:
"frog" move to "dummy". I'm sorry if you aren't understanding what I am saying, and a link to making and using dummy objects is " [url]http://www.youtube.com/watch?v=2qHg7HoV19w[/url] "
Sorry if you didn't understand me, and if you didn't I hope the video helps!
~Okyloky9

Sinaptic 06-20-2012 11:10 PM

1 Attachment(s)
i get what you mean with the dummy object but the problem is that the frog is never that close to the water.

If it's not on a turtle then it just floats above the water.

i attached the a2w file if you can help with this at all.

thanks for the quick reply by the way

okyloky9 06-20-2012 11:18 PM

No problem, I'll work on it and send it back.
~Okyloky9

Sinaptic 06-21-2012 12:09 AM

thanks


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

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