-
Notifications
You must be signed in to change notification settings - Fork 125
Levels
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.
- 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
float - Auto scrolling speed along X axis.
float - Auto scrolling speed along Y axis.
pointer - Level's collection of basemaps.
integer - Number of basemaps in the level.
integer - Number of entities marked as a boss.
string - Filename of music track that will play when a boss is spawned into level.
integer - Boss music offset point. See music.
Toggles slow motion effect when a boss is defeated.
- BOSS_SLOW_OFF
- BOSS_SLOW_ON
Offset for the player's viewpoint along X axis.
Offset for the player's viewpoint along Y axis.
When this flag is active, the level will end on next engine update.
Toggles player taking damage from enemy attacks. When on, attacks still hit but damage is reduced to 0.
- DAMAGE_FROM_ENEMY_OFF
- DAMAGE_FROM_ENEMY_ON
Toggles player attacking other player. When on, player's attacks will pass through another player other.
- DAMAGE_FROM_PLAYER_OFF
- DAMAGE_FROM_PLAYER_ON
Toggles forcing the player to face a direction in the level.
- FACING_ADJUST_NONE - No facing adjustment.
- FACING_ADJUST_RIGHT
- FACING_ADJUST_LEFT
- FACING_ADJUST_LEVEL - Face according to level's scroll direction.
float
Gravity rating for level.