Alice Community

Alice Community (http://www.alice.org/community/index.php)
-   How do I...? (http://www.alice.org/community/forumdisplay.php?f=16)
-   -   How Do I Make Hills??? (http://www.alice.org/community/showthread.php?t=191)

madden 03-17-2006 09:27 PM

How Do I Make Hills???
 
How do I make hills in alice 2.0. I could not think of eneything.
Gabe please help me.

P.S Visit me! Oh I know we could eat Icecream together, get brainfreeze together, and Scream together!

lanceA 03-17-2006 10:07 PM

Making Hills
 
In the Environments folder there is a Hill class. Using multiple instances of this class and changing the color of each instance creates some nice hills. Additionally the Nature folder has a Vocano. I used two instances of the Rock class in the Nature folder and resized them to also simulate hills. - Hope this helps.

madden 03-21-2006 07:37 PM

ok...partly worked
 
ok, that worked, but I walk thrue them can I stop that???
thanks for responding...

P.S ... I can't think of eneything

lanceA 04-06-2006 09:39 AM

To prevent 'walking through' the mountains you may wish to use an Alice function, distance to - that function will return the distance (in meters), however it measures from the 'center' of objects. Therefore you may wish to try something like:

[I]object[/I] move forward ([I]object[/I] distance to mountain - 1)

Replace 'object' with the name of your object, i.e., robot, Alice, skater, etc. You also may have to experiment with the amount (-1) to be subtracted.

The manual, Learning to Program with Alice has an even better method to do this, Page 56.

Hope this helps.

madden 02-17-2007 01:30 PM

Thanks
 
Thanks it did:)

P.S Thanks it did:)


All times are GMT -5. The time now is 10:24 PM.

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