————————————————————————— Joystick ————————————————————————— ~Introduction~ I made this as a resource that anyone can remix and use, so if your game needs a joystick, here is the place to look! Obviously you don’t HAVE to use the starfish, but I’d love to see some creative uses of it. ~How I Made It~ I initially tried to get the starfish moving left when the mouse was to the left of the circle and so on, but that didn’t work. Because I did the same for up and down, it could only ever move diagonally, which isn’t ideal. So instead I decided to get Scratch to do a bit of maths. The position of the mouse, MINUS the position of the circle. This meant that the starfish always moved in the direction of the mouse compared to the circle. ~Future Goals~ I might eventually make a game using this, but not very soon. Also, I’d love to improve the way it looks, and maybe add some animations other than the circle pointing towards the mouse. I finally added a little animation for the starfish slowing down so it doesn’t just STOP in the middle of the screen, which is nice.
~Credits~ All the code is original, but the starfish is a sprite from the library. ~Other Information~ You can remix this if you want, or just backpack the sprites, but either way it would be nice if you gave credit. If you’re backpacking the sprites, you will need ALL of them (apart from the thumbnail), otherwise the joystick won’t work.