Alice Community Compare Turn Direction

 Compare Turn Direction
 KsMomof2 Junior Member   Status: Offline Posts: 4 Join Date: Feb 2016 Location: Virginia Compare Turn Direction - 02-21-2016, 06:38 PM Am I missing something? I can compare numbers, strings, sThings, but not variables of Other Types - such as turn direction? Last edited by KsMomof2; 05-08-2016 at 04:31 PM.
 Questions
 MrMoke Senior Member     Status: Offline Posts: 501 Join Date: Sep 2007 Location: Austin, Texas Questions - 02-22-2016, 03:21 PM 1) Version 2 or 3? 2) What are you trying to accomplish?
 RavenOfCode Senior Member     Status: Offline Posts: 409 Join Date: Oct 2013 Location: Northern Virginia 02-22-2016, 07:50 PM Turn directions is a bool so you can compare it. Stuff + Other Stuff + Different Other Stuff = Things :) My best Alice game: Clash of the Cubes (an arena fighting game): http://www.alice.org/community/showthread.php?t=10738&highlight=game
 KsMomof2 Junior Member   Status: Offline Posts: 4 Join Date: Feb 2016 Location: Virginia More Information on turn direction - 02-27-2016, 05:08 PM 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
Senior Member

Status: Offline
Posts: 409
Join Date: Oct 2013
Location: Northern Virginia
02-27-2016, 08:32 PM

Quote:
 Originally Posted by KsMomof2 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.
Send in a bool and compare that.

Stuff + Other Stuff + Different Other Stuff = Things :)

My best Alice game:

Clash of the Cubes (an arena fighting game):

 Tags compare, direction, if-else, turn, variable

 Thread Tools Display Modes Linear Mode

 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 Rules
 Forum Jump User Control Panel Private Messages Subscriptions Who's Online Search Forums Forums Home Announcements     Community News and Announcements Alice 3     How Do I?     Works In Progress     Share Your World     Share Custom Classes     Bugs and Trouble Shooting     Suggestion Box Alice 2     How do I...?     Works-In-Progress     Share Worlds     Share Objects     Bugs and Troubleshooting     Suggestion Box Educators     Teaching with Alice     Teaching Using Alice 3     Teaching Using Alice 2     CS Principles and Alice     AP CSA and Intro to Java and Alice     Workshops     Alice Player and VR General Discussion     Questions and Comments     The Lounge