BGP (TeaScript)

From Moondust Wiki
Jump to navigation Jump to search

BGP is a class in TeaScript.vbs that allows you to read/write values for the level's background.

To read the value of BGP use:

BGP(id).name

id stands for the BGP ID. To change the value of BGP use:

BGP(id).name = value
Type Name Read/Write Description
double x - -
double y Read Only -
double z Write Only -
Name Type Description
Splitcount R&W Stands for how many times the background is split. Different parts have different configurations.
Splitter R&W A string that contains the y-positions of the splitting points, consisting of a series of floating point values separated by commas.

(Ex: BGP(1).splitter = "64, 130")

Zsp R&W A string offset that constants of the background, consisting of a series of floating point values separated by commas.

(EX: BGP(1).zsp = "4, 8")

Movesp R&W A string that contains the speed of the background's parts in pixels per frame, consisting of a series of floating point values separated by commas.

(EX: BGP(1).movesp = "1, 2.5")

Offset R&W A string that contains the current offset value of the background's parts, consisting of a series of floating point values separated by commas.

(EX: BGP(1).offset = "32, 48")