Skip to content

Motion Module

syeyoung edited this page Jul 16, 2020 · 3 revisions

Motion Module

Motion module contains blocks defined in Motion tab

Motion module can be imported via

Require "Motion";

What is named object that will appear later

All named object can be

_mouse_ : mouse

_random_ : random pos

spritename : sprite named spritename

Defined Functions

Motion::glideNamed(name: Text, time: Text) : glide to named object name in time seconds

Motion::turnRight(degrees: Text) : turn right degrees degrees

Motion::setDirectionDegrees(degrees: Text) : set direction in degrees

Motion::setDirectionTowards(name: Text) : point sprite towards named object name

Motion::getDirection() : get direction in degress (Expression only)

Motion::setY(y: Text) : set Y coord of sprite

Motion::edgebounce() : if sprite is on edge, bounce

Motion::setX(x: Text) : set X coord of sprite

Motion::moveDirection(steps: Text) : move steps in current direction

Motion::getYPos() : get Y coord of sprite (Expression only)

Motion::setRotationStyle(style: Text) : set Rotation style of sprite "left-right" or "all around" or "don't rotate"

Motion::addX(x: Text) : add to X coord of sprite

Motion::getXPos() : get X coord of sprite (Expression only)

Motion::turnLeft(degrees: Text) : turn left degrees degrees

Motion::glideXY(x: Text, y: Text, time: Text) : glide to (x,y) in time seconds

Motion::addY(y: Text) : add to Y coord of sprite

Motion::moveNamed(name: Text) : move to named object name

Motion::moveXY(x: Text, y: Text) : move to (x,y)

Defined Events

N/A

Clone this wiki locally