YoYo Games Wiki

speed

From YoYoGames Wiki

Description

(real): the speed of the object in its direction

Explanation

The speed variable is a local variable containing the speed of a certain object. Note that this speed is the result of hspeed and vspeed. Setting speed and direction will affect hspeed and vspeed and it also works the other way round. An object with a given speed will move the amount of pixels contained in the speed variable in the direction of the "direction" variable.