Alice Community

Alice Community (http://www.alice.org/community/index.php)
-   How do I...? (http://www.alice.org/community/forumdisplay.php?f=16)
-   -   Making a Character Move Smoothly in Response to Arrow Keys (http://www.alice.org/community/showthread.php?t=11273)

wbarnum 08-20-2015 01:59 PM

Making a Character Move Smoothly in Response to Arrow Keys
 
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?

[B]Edit: This is for Alice 3.25
[/B]
Thanks in advance.

MrMoke 08-20-2015 02:49 PM

1 Attachment(s)
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.

wbarnum 08-21-2015 09:26 AM

[QUOTE=MrMoke;56712]
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.[/QUOTE]

Thanks for the response. You wouldn't happen to have or know where I could find a sample from Alice 3 would you?

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


All times are GMT -5. The time now is 10:27 AM.

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