Point and move towards the mouse
On every tick, point the sprite at the mouse and step forward β the sprite will chase the cursor around the stage.
whenGreenFlag(() => { forever(() => { pointTowards("mouse"); move(4); });});The sprite turns to face the cursor and moves 4 steps toward it every frame. Increase the step count for a faster chase.
Functions used
Section titled βFunctions usedβwhenGreenFlagβ run code when the green flag is clickedforeverβ repeat a block of code indefinitelypointTowardsβ point this sprite towards another sprite or the mousemoveβ move forward by a number of stepstouchingβ check whether this sprite is touching a target, the mouse, or the edge