PDA

View Full Version : Move object left or right smoothly with arrow keys.


Sritsod
01-23-2007, 11:13 AM
Hi Folks,

I'm an educational researcher at Bowling Green State University in Bowling Green, Ohio. I'm trying to put together a quick demo game I've done partially in flash into Alice. It's a simple shape catching game that I hope will randomly generate circles, squares and triangles and drop them to be caught by a open half cylinder. I can get the bucket object to move via the left/right arrow keys but I don't really need to have all 4 keys. I'd like to have the left/right keys move the bucket left/right smoothly as needed. I can't seem to figure it out. Any help pointing me in the right direction would be appreciated.

Thanks,

Mark

axeraider131
02-03-2007, 09:26 PM
if you go to "when a key is typed" in the events section, right click on it and scroll your mouse over "change to" an select "while a key is pressed." after that, you an put into the during section: "bucket move right at 5 meters per second " and put in "bucket move right at 3 meters per second for 0.5 seconds" for the end section. this creates a somewhat smoother finish for the moving bucket. i hope that this helped.

-----------------------------------
Axeraider 131
<[}{]>
---------
+++++