1 / 5

Simple Example for Movement and Sensing with Random Sprite Movement

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.

Download Presentation

Simple Example for Movement and Sensing with Random Sprite Movement

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Simple example for movement and sensing (1/5) • Run 'Random Movement of Sprites' project

  2. Simple example for movement and sensing (2/5) • Select 'Sprite1' to get its code

  3. 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

  4. 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

  5. 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

More Related