ScratchData LogoScratchData
Back to kriblo_test's profile

Demo: Evade

KRkriblo_test•Created March 7, 2023
Demo: Evade
13
9
195 views
View on Scratch

Instructions

This remix is to illustrate the simplicity of the basic evasion code used in my original project. Check it out: https://scratch.mit.edu/projects/814295073 Move your mouse towards the green circle. All art and code by me (@kriblo). All code is in the Evader sprite, while two auxiliary sprites are used for the "point toward" and "touching" blocks: Center and Frame. If Evader is closer than 150 pixels to the mouse pointer, it moves away, faster the closer it is. If it then touches the outer Frame sprite, it turns towards the Center sprite and moves until it's no longer touching the Frame. It then turns 90 degrees clockwise and moves forward (along the perimeter). Again, and finally, it moves towards the Center until it's not touching the Frame (as it might have moved into Frame when moving "along the perimeter").

Project Details

Project ID815004574
CreatedMarch 7, 2023
Last ModifiedMarch 7, 2023
SharedMarch 7, 2023
Visibilityvisible
CommentsAllowed

Remix Information

Parent ProjectView Parent
Root ProjectView Root