Alice Community

Alice Community (http://www.alice.org/community/index.php)
-   How do I...? (http://www.alice.org/community/forumdisplay.php?f=16)
-   -   Compare Turn Direction (http://www.alice.org/community/showthread.php?t=11441)

KsMomof2 02-21-2016 05:38 PM

Compare Turn Direction
 
Am I missing something?

I can compare numbers, strings, sThings, but not variables of Other Types - such as turn direction?

MrMoke 02-22-2016 02:21 PM

Questions
 
1) Version 2 or 3?
2) What are you trying to accomplish?

RavenOfCode 02-22-2016 06:50 PM

Turn directions is a bool so you can compare it.

KsMomof2 02-27-2016 04:08 PM

More Information on turn direction
 
Specifically I am trying to create a dance method that imitates "The Twist" in version 3.

The joints have to turn left, then right ... OR ... right then left. I want to make the dance work so that some objects start turning left first, and others turning right ... so, I want to send the turn direction in as a parameter, and then in the method, I want to use the opposite direction - which requires knowing which direction was sent in.

Because I could not figure out how to compare the direction, I solved the problem by just sending in a first direction and a second direction - but, that is ... ugly in my mind. I would still like to learn how to compare the directions.

RavenOfCode 02-27-2016 07:32 PM

[QUOTE=KsMomof2;57073]Specifically I am trying to create a dance method that imitates "The Twist" in version 3.

The joints have to turn left, then right ... OR ... right then left. I want to make the dance work so that some objects start turning left first, and others turning right ... so, I want to send the turn direction in as a parameter, and then in the method, I want to use the opposite direction - which requires knowing which direction was sent in.

Because I could not figure out how to compare the direction, I solved the problem by just sending in a first direction and a second direction - but, that is ... ugly in my mind. I would still like to learn how to compare the directions.[/QUOTE]
Send in a bool and compare that.


All times are GMT -5. The time now is 07:43 AM.

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