World (class)
Jump to navigation
Jump to search
This class provides fields/functions for managing World. Please note that there is no constructor, only the singleton world object! You can access these methods/fields via world.yourField or world:yourMethod
Worldclass | |||
---|---|---|---|
Type | Function/Field | Return values/Value type | Description |
function | world:mem(int offset, int fieldtype, object value) | nil | Sets a value of the World struct at a specific address-offset. |
function | world:mem(int offset, int fieldtype) | object | Returns a value of the World struct at a specific address-offset. |
Field | world.playerX | double | The x coordinate of the player on the world map. |
Field | world.playerY | double | The y coordinate of the player on the world map. |
Field | world.playerWalkingDirection | int | Gets/Sets the current walking direction. Following walking direction values: 0 - Idle 1 - Walking Up 2 - Walking Left 3 - Walking Down 4 - Walking Right |
Field | world.playerWalkingTimer | int | Gets/Sets the current walking timer. This value will increment from 0 to 32 by 2 each frame. It is an indicator if the player reached the tile. If the value is 32 then the player reached the tile. |
Field | world.playerWalkingFrame | int | Gets/Sets the current walking frame. Following frame values: 0 or 1 - Walking Frames Down 2 or 3 - Walking Frames Right 4 or 5 - Walking Frames Left 6 or 7 - Walking Frames Up |
Field | world.playerWalkingFrameTimer | int | Gets/Sets the current walking frame timer. This value will increment from 0 to 8 by 1 each frame. If the value is 8 then the playerWalkingFrame is swapped. For example: If walking down and the value is 0 then the value will be chaged to 1. |
Field (ro) | world.playerIsCurrentWalking | int | If the player is currently walking/moving the this field is set to true. Otherwise the field is set to false |
Field (ro) | world.levelTitle | VBStr or nil | If the player stands under a level the level title will be returned. Otherwise nil is returned. |
Field (ro) | world.levelObj | Level or nil | If the player stands under a level the level object will be returned. Otherwise nil is returned. |
Field (ro) | world.playerCurrentDirection | int | Similar to world.playerWalkingDirection but does return the direction values even if the player is not walking. Following walking direction values: 1 - Looking Up 2 - Looking Left 3 - Looking Down 4 - Looking Right |