Skip to content

Global Script

NebSeniah edited this page Jul 23, 2026 · 6 revisions

System Summary

A script containing enums and signals used across all other scripts.


Connected Systems

Connecting Systems:

Related Controls

N/A

Bugs

  • None

Feature List / Breakdown of Features

Global Enums:

  • State: The state of the application.
  • Tool: The tools used during the editor state.
  • WalkingState: The possible states that the player can be in for walking for audio (Ground, ice, slow, none).
  • HotbarState: The state of the object hotbar in the editor state.
  • BoxBrushState: The state of the box brush, to determine wait times for confirmation.
  • TileType: The different tiles and their numeric indices. (MUST MATCH TileSet.tres)
  • EntityType: The numeric indices of the entities and props.

Global Signals:

  • death: Emitted when the player dies, resetting the scene.
  • reload: Emitted when the level scene is reloaded.
  • complete: Emitted when the player reaches the goal, returning to editor state.
  • levelCreated: Emitted when a new level is created from the main menu.
  • checkpointCollected: Emitted whenever the player reaches a checkpoint.
  • goalReached: Emitted whenever the player reaches a goal.
  • onCoinCollected: Emitted whenever the player collects a coin.

Important Variables

  • BEDROCK_CORNER: int = 9997 = The first index of the border tile that surrounds every level. Used as the margin in several other scripts to prevent placing.
  • BEDROCK_WALL: int = 9998 = The second index of the border tile that surrounds every level.
  • ERASING_TILE: int = 9999 = The index of the erasing tile graphic. Used purely for previews.
  • TILE_SIZE: int = 128 = The size of all cells in pixels.

Important Functions

  • N/A

Future Work / Risks

Future Work: N/A

Risks:

  • N/A

Miscellaneous Notes

  • TILE_SIZE should have its name edited for consistency: "CELL_SIZE"

Clone this wiki locally