Alice Community  

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

Reply
 
Thread Tools Display Modes
Help will be appreciated!
Old
punimon213
Guest
 
Status:
Posts: n/a
Default Help will be appreciated! - 09-22-2009, 11:33 AM

i have am having a hard time thinking on how to make your Alice character move in 4 directions in one method, example if i press the arrow key left the character must turn a certain degree then if i press it second time the character should move forward and not turn same goes if i press other arrow keys.
   
Reply With Quote
Old
x2495iiii
Super Moderator
 
x2495iiii's Avatar
 
Status: Offline
Posts: 3,508
Join Date: Dec 2008
Location: Somewhere in the Continental U.S.
Default 09-22-2009, 01:05 PM

You'd need some kind of if/else if statement to determine whether the character is oriented to the direction the user presses when a direction is pressed. Maybe you could check to see if the character is already facing in the direction which is pressed, if not, he turns, if so, the character moves forward.


(')>
   
Reply With Quote
Old
punimon213
Guest
 
Status:
Posts: n/a
Default 09-23-2009, 03:47 AM

Quote:
Originally Posted by x2495iiii View Post
You'd need some kind of if/else if statement to determine whether the character is oriented to the direction the user presses when a direction is pressed. Maybe you could check to see if the character is already facing in the direction which is pressed, if not, he turns, if so, the character moves forward.
Sir, i got what you mean and can i clarify something can i still do what i ask even without using a "orienting object" because that's what our teacher wants us to do.
   
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.