Skip to content

sp_speed

Version: Dink   Freedink   DinkHD   YeDink

Prototypeint sp_speed(int active_sprite, int speed[-1])

sp_speed() gets or sets the speed of the active_sprite. Higher speed numbers equal faster sprites.

Internally, sp_speed() sets sp_mx() and sp_my() to appropriate values for the direction the sprite is moving. Therefore, it is also dependent upon sp_timing().

Dink's speed can not be altered using sp_speed(). See set-dink-speed() for that.

It is not recommended to use sp_speed() to get Dinks speed, it may return an incorrect value. Instead use get-dinkspeed()