Alice Community

Alice Community (
-   How do I...? (
-   -   Why can't I use distance to function in if/else statement? (

leslie1165 11-12-2011 06: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!


Powerhouse64 11-12-2011 07: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 08:46 PM

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


All times are GMT -5. The time now is 01:37 PM.

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