GenGrowSprite sprite, growToX, growToY, msDuration


The sprite to grow (scale).


This is the X scale to grow to. Values are 0.0 - 1.0+


This is the Y scale to grow to. Values are 0.0 - 1.0+


This is the duration of the grow in milliseconds.

This command can be used to "grow" (scale) a sprite. Sprites can grow smaller or bigger. The scaling begins with the current sprite scale and grows the sprite to the specified X and Y scale. The whole scaling event is timed to take msDuration milliseconds. This command can be made to call a user defined Event subroutine upon completion.

include "Game Engine"

'...Turn on the game engine and init a sprite...

SetOnGenSpriteModifierSub sprite, onSpriteModifier()

GenGrowSprite sprite, 1.5, 1.5, 5000

'...continue with program...

Sub onSpriteModifier(sprite, type)

if type = Mod_Grow_Complete then

GenSetSpriteRed sprite, rnd(100)
GenSetSpriteGreen sprite, rnd(100)
GenSetSpriteBlue sprite, rnd(100)


End Sub


Game Engine Mode

Become a Patron