Alice Community

Alice Community (http://www.alice.org/community/index.php)
-   How do I...? (http://www.alice.org/community/forumdisplay.php?f=16)
-   -   Why can't I use distance to function in if/else statement? (http://www.alice.org/community/showthread.php?t=7562)

leslie1165 11-12-2011 07:11 PM

Why can't I use distance to function in if/else statement?
 
I'm working through "Virtual World Design and Creation for Teens" and have hit a snag. The book is telling me to create a collision detection function. I'm supposed to be able to use the "distance to" function of a character in an if/else statement, but I can't get the function to drag and drop into the right place. The first two proximity functions for the character will work, but none of the distance functions will.

Anyone know what I'm doing wrong?

Thank you!

Leslie

Powerhouse64 11-12-2011 08:24 PM

What you need is a world function that requires two variables. You need a function like a>b to drag those values in. Try dragging one of those (empty) into your if/else statement, then put in the necessary values and distance functions.

Hope this helps!

leslie1165 11-12-2011 09:46 PM

Thank you! That did it. (I wish that had been in the textbook instructions!)

Leslie


All times are GMT -5. The time now is 01:40 AM.

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