Level (class)

From PGE Wiki
Jump to: navigation, search

This class provides fields/functions for managing Levels in the overworld.

Level class
Type Function/Field Return values/Value type Description
function Level:mem(int offset, int fieldtype, object value) nil Sets a value of the Level struct at a specific address-offset.
function Level:mem(int offset, int fieldtype) object Returns a value of the Level struct at a specific address-offset.
Field Level.x double The x position of the level.
Field Level.y double The y position of the level.
Field Level.goToX double The x position to the destination position. (LunaLua ≥ v0.7.2)
Field Level.goToY double The y position to the destination position. (LunaLua ≥ v0.7.2)
Field Level.topExitType number The exit type which triggers the top path. (LunaLua ≥ v0.7.2)
Field Level.leftExitType number The exit type which triggers the left path. (LunaLua ≥ v0.7.2)
Field Level.bottomExitType number The exit type which triggers the bottom path. (LunaLua ≥ v0.7.2)
Field Level.rightExitType number The exit type which triggers the right path. (LunaLua ≥ v0.7.2)
Field Level.levelWarpNumber number The warp id in the level which should be used, when the Player enters the level. (LunaLua ≥ v0.7.2)
Field Level.isPathBackground boolean If the level item has a path background. (LunaLua ≥ v0.7.2)
Field Level.isBigBackground boolean If the level item has a big path background. (LunaLua ≥ v0.7.2)
Field Level.isGameStartPoint boolean If the level item is the game start point. (LunaLua ≥ v0.7.2)
Field Level.isAlwaysVisible boolean If the level is always visible. (LunaLua ≥ v0.7.2)
Field Level.visible boolean Whether the object is visible or not. (LunaLua ≥ v0.7.3.2)
Field (ro) Level.title string The level title.
Field (ro) Level.filename string The level filename.


Offsets

(Section under construction)

Level Memory (0x__ bytes)
Name Memory address Memory type Description
Unknown Level+0x00 FIELD_WORD Unknown
Unknown Level+0x02 FIELD_WORD Unknown