-
Notifications
You must be signed in to change notification settings - Fork 155
Levels
Damon V. Caskey edited this page May 3, 2017
·
10 revisions
Levels - In progress
Level properties are open to script. OpenBOR loads one level at a time, and purges the level when completed. This is done as a memory saving measure, and means that a given level's properties are only available while that level is active.
Get a level property.
mixed value = get_level_property(void level_handle, int property);
- level_handle is a pointer to the target level. This is for future compatibility. For now, always pass NULL() to target the current level.
- property accepts a LEVEL_PROP_... integer constant. See below for the list of available properties.
Modify a level property.
set_level_property(void level_handle, int property, mixed value);
- value is the new value for target property.
Controls the direction level scrolls if auto scrolling is active. Uses the following integer constants.
- SCROLL_RIGHT
- SCROLL_DOWN
- SCROLL_LEFT
- SCROLL_UP
- SCROLL_BACK
- SCROLL_BOTH
- SCROLL_RIGHTLEFT
- SCROLL_LEFTRIGHT
- SCROLL_INWARD
- SCROLL_OUTWARD
- SCROLL_OUTIN
- SCROLL_INOUT
- SCROLL_UPWARD
- SCROLL_DOWNWARD
Floating decimal. Controls auto scrolling speed along X axis.
Floating decimal. Controls auto scrolling speed along Y axis.