GenSetParallaxLayer


GenSetParallaxLayer parallaxBackground, childBackground, layer { scrollFactorX, scrollFactorY }

parallaxBackground

The parallax background to which the child background will be inserted.

childBackground

The child background to insert into the parallax background.

layer

The layer to add the background to.

scrollFactorX

This optional parameter sets the child background X scroll factor. When the parallax background is scrolled in the X direction that distance is multiplied by this factor and this child background is scrolled that distance.

scrollFactorY

This optional parameter sets the child background Y scroll factor. When the parallax background is scrolled in the Y direction that distance is multiplied by this factor and this child background is scrolled that distance.


This command is used to set the child background of a parallax background.

The optional X and Y scroll offsets allow the child backgrounds to scroll at different rates.

The parallax layers are the same layers we put sprites on. So if you add a background to layer 5 the background will be drawn just behind all the sprites on layer 5


Game Engine Overview







Become a Patron