50 likes | 125 Views
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'
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