GenZoomBackground


GenZoomBackground background, zoomToX, zoomToY, msDuration

background

The background to zoom (scale).

zoomToX

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

zoomToY

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

msDuration

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 Constants.inc"

'...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

endif

End Sub




SetOnGenBackgroundModifierSub


Game Engine Overview






Become a Patron