forked from frogatto/frogatto
-
Notifications
You must be signed in to change notification settings - Fork 0
level
DDR0 edited this page Nov 3, 2011
·
2 revisions
The level variable can be accessed anywhere, from any object. It returns a variety of values accessible via the dot operator. For example, to get a list of objects in the level, we might ask for level.chars. Here is a list of all the data in level:
| name | rights | contents |
| active_chars | r | |
| camera_position | rw | Returns list containing the upper-left corner x/y coordinates of the screen and the width/height of the screen. It may be set to a two-element list containing an x/y pair to instantly snap the camera to a position. Note that, unlike most variables, the value you set it to is different than the value it returns. |
| chars_immune_from_freeze | w | |
| chars | r | Contains a list of every object in the level. |
| cycle | r | An integer value telling how many frames have passed since the level was loaded. |
| dimensions | r | |
| dimensions | w | |
| focus | rw | |
| gui | r | |
| id | r | |
| in_dialog | r | |
| in_dialog | w | |
| in_editor | r | |
| local_player | r | |
| lock_screen | w | |
| num_active | r | |
| num_segments | r | |
| player | r | The player object. |
| segment_height | r | |
| segment_width | r | |
| time_freeze | rw | |
| zoom | rw |