GenZoomBackground background, zoomToX, zoomToY, msDuration


The background to zoom (scale).


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


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


This is the duration of the zoom in milliseconds.

This command can be used to "zoom" (scale) a background. Backgrounds can zoom smaller or bigger. The scaling begins with the current background scale and zooms the background 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 background...

SetOnGenBackgroundModifierSub background, onBackgroundModifier()

GenZoomBackground background, 150, 150, 5000

'...continue with program...

Sub onBackgroundModifier(background, type)

if type = Mod_Zoom_Complete then

GenSetBackgroundRed rnd(100), background
GenSetBackgroundGreen rnd(100), background
GenSetbackgroundBlue rnd(100), background


End Sub


Game Engine Overview

Become a Patron