50 likes | 129 Views
This project demonstrates how to create random sprite movement using set functions to initialize starting position, looping with forever, adding delays with wait, moving sprites to new x positions, setting sprites to random y positions, and utilizing bounce function to flip sprites at screen edges.
E N D
Simple example for movement and sensing (1/5) • Run 'Random Movement of Sprites' project
Simple example for movement and sensing (2/5) • Select 'Sprite1' to get its code
Simple example for movement and sensing (3/5) • Use 'set' functions to initilalize the starting position of 'Sprite1' • Use 'forever' to infinite loop • Use 'wait' function to a ceratin delay
Simple example for movement and sensing (4/5) • Use 'move' to put 'Sprite1' to a new 'x' position • Use 'set y to' function to set the Sprite to a random 'y' position
Simple example for movement and sensing (5/x) • Use 'if on edge, bounce' function to flip the 'Sprite1' when it reaches the edge of the screen