Alice Community  

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

Reply
 
Thread Tools Display Modes
Why can't I use distance to function in if/else statement?
Old
leslie1165
Junior Member
 
Status: Offline
Posts: 2
Join Date: Nov 2011
Default Why can't I use distance to function in if/else statement? - 11-12-2011, 06:11 PM

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
   
Reply With Quote
Old
Powerhouse64
Senior Member
 
Powerhouse64's Avatar
 
Status: Offline
Posts: 54
Join Date: Nov 2011
Location: In ur base, movin ur stuffs
Default 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!


Hogwarts: Where everything is made up, and the points don't matter
   
Reply With Quote
Old
leslie1165
Junior Member
 
Status: Offline
Posts: 2
Join Date: Nov 2011
Default 11-12-2011, 08:46 PM

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

Leslie
   
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.