I'm currently making a version of the classic game Asteroids! For anyone who hasn't heard of it, its a game where you are a space ship shooting asteroids that come at you. I want to have the player able to navigate by means of using the mouse to select a direction and have you able to move smoothly (if possible) in the direction using the arrow keys. However, I cant seem to write a script to do this. Any help?
Offline
if you use arrow keys there are multiple ways of programming this. One way: Use the when key ___ pressed block then under it a change X by ___ it could work. But to make it smooth use a forever loop. Inside it have an [if key right arrow pressed] and then an if with [if key left arrow pressed]. Then use change X axis by ___
Offline
mmww, thank you for the suggestion. I have tried it and find the ship unable to stop moving in that direction. The get somewhat stuck and after all of the directions are pressed, it doesn't move at all.
Offline
Does this help?
http://scratch.mit.edu/projects/Averydan/2790825
Offline