Actions

Actions are a basic element of the Mage Game Engine (MGE).

Actions are individual units of script behavior, such as a logic check or state management, given one after the other within a single script. They each have predefined arguments, and their names are written in "SCREAMING_SNAKE_CASE." In the final encoded data, they are 8 bytes apiece.

Through MGS Natlang, they can be written as one or more "natural language" patterns.

Game Management

Handle the general state of the game, such as loading maps, timing game actions, enabling and disabling player input, and managing save states.

Hex Editor

Enable or disable player control of specific game features, and otherwise manage the hex editor state.

Serial Console

Manage serial features and create serial output.

Camera Control

Manipulate the camera's position or perform tricks like shaking the camera or fading the screen in and out to an arbitrary color.

Script Control

Set a specific on_tick or on_interact script, run another script, or recursively copy the actions inside another script.

Entity Choreography

Move entities around the map using vector objects placed with Tiled.

NOTE: These actions can behave erratically if any of the vertices in the geometry object are subject to coordinate underflow.

Entity Appearance

Many of these actions (the ones that don't have an explicit duration) will happen instantly. Therefore, if several are used back-to-back, they will all resolve on the same frame. If this is not intended behavior, you should pad them with non-blocking delay.

Set Entity Properties

Set a specific property on a specific entity.

Set Variables

Manipulate MGE variables or set them to an arbitrary value.

Check Entity Properties

These actions check whether one of an entity's properties matches a specific state. If the condition is met (or not met), then the script will jump: either to a specific point in the same script or the top of an entirely different script.

You can use %SELF% to target the entity running the script and %PLAYER% to target the player entity. Otherwise, you must use the entity's given name (its name in Tiled).

You can use the condition portion of these following actions with if and else.

Check Variables

Check whether one of the MGE variables matches a specific value. If the condition is met (or not met), then the script will jump: either to a specific point in the same script or the top of an entirely different script.

You can use the condition portion of these following actions with if and else.