Thursday, 4 January 2018

17) Using Coordinate and Glide block

Using Coordinate and Glide block

Location of any sprite placed in stage area is determined by x-y coordinates. Sprite can be moved or glided from one set of coordinate to another.

Finding the location of sprite

You can find the current location of your sprite by checking the “Current Sprite Info” area shown below:



  1. X: gives the position of sprite in x coordinate
  2. y: gives the position of sprite in y coordinate
  3. Direction: Gives the direction of sprite.

Gliding the sprite to specific location

You can glide a sprite to specific location instead of moving it. When gliding it reaches its destination smoothly. Time taken to reach the destination can be specified.

To Glide:
  1. Click on motion blocks palette.
  2. Drag and drop glide block to script area.
  3. Specify the final location of sprite to glide to. Fill x and y coordinates
  4. Specify the time required to reach the destination

Given below is a sample script to glide your sprite from one location to another:




The sprite first glides position x = 40 y = 80 in one sec. Then it glides back to position x = -40 and y =  -80.  The process continues endlessly.

No comments:

Post a Comment

1) Introduction to Email

Introduction to Email Introduction Communication, the transfer of information, has been the key element needed ...