Alice Community  

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

Reply
 
Thread Tools Display Modes
Making a Character Move Smoothly in Response to Arrow Keys
Old
wbarnum
Member
 
Status: Offline
Posts: 20
Join Date: Jun 2015
Question Making a Character Move Smoothly in Response to Arrow Keys - 08-20-2015, 01:59 PM

I have a student who is trying to make a character move smoothly in response to arrow keys. He has written some code to make the character move, but the character is moving in a jerky motion.

Does anyone know of any tutorials or have instructions or sample code?

Edit: This is for Alice 3.25

Thanks in advance.

Last edited by wbarnum; 08-20-2015 at 02:52 PM.
   
Reply With Quote
Old
MrMoke
Senior Member
 
MrMoke's Avatar
 
Status: Offline
Posts: 501
Join Date: Sep 2007
Location: Austin, Texas
Default 08-20-2015, 02:49 PM

Make sure that your student is aware of the timing issues involved when using things like doInOrder and doTogether. You can also control individual actions by modifying the options available with each command by clicking the more... button.
See the attached example of using the style... options to see the difference it can make, although not using keypress events.


FWIW- The same style options are available in 3.2.5. Once the keypress event is created, you can test the results.
Attached Files
File Type: a2w styleOptions.a2w (555.6 KB, 3 views)

Last edited by MrMoke; 08-20-2015 at 05:14 PM.
   
Reply With Quote
Old
wbarnum
Member
 
Status: Offline
Posts: 20
Join Date: Jun 2015
Default 08-21-2015, 09:26 AM

Quote:
Originally Posted by MrMoke View Post
See the attached example of using the style... options to see the difference it can make, although not using keypress events.


FWIW- The same style options are available in 3.2.5. Once the keypress event is created, you can test the results.
Thanks for the response. You wouldn't happen to have or know where I could find a sample from Alice 3 would you?
   
Reply With Quote
Old
MrMoke
Senior Member
 
MrMoke's Avatar
 
Status: Offline
Posts: 501
Join Date: Sep 2007
Location: Austin, Texas
Default 08-21-2015, 11:13 AM

Easiest way is to do a quick internet search for something like "Alice 3 Key Press events", and see what you get.
There is at least one somewhat dated YouTube video that covers the basics. However, you will still need to play around with the Style options for individual commands, as well as the "add detail" options on the keypress event.

The finished product will need to contain more than simple move and turn statements if you are going for realistic animation. Timing is critical when using combinations of "Do Together" and "Do In Order" statements, or it can get jerky.

Last edited by MrMoke; 09-09-2015 at 08:10 AM.
   
Reply With Quote
Reply

Thread Tools
Display Modes

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.