Build a GameCreating Chess

Appendix C — Cheat Sheet

Every Event and Action Chess uses, with what it does in one line, in Myth’s own words.

C.1 Events

2D Direction Pressed
Runs once when the selected Left, Right, Up, or Down direction is pressed.
Command Pressed
Runs once when the selected Button Command matches its Single, Double, or Triple Press pattern.
Create
Runs once when an instance is created.
Custom Event
Runs when another action or script triggers the selected named custom event.
Draw
Runs when the instance should draw custom visuals or UI text.
Game Start
Runs once when the game starts.
Game State Changed
Runs after the singular project Game State changes.
Mouse Pressed on Object
Runs once when a mouse button is newly pressed over this instance.
Recurring Timer
Runs each time the named recurring timer comes due.
Scene Start
Runs when the scene starts.
UI Activated
Runs on this UI Object when the player activates its button or confirms one of its menu rows.

C.2 Actions

Change Component Value
Changes one mutable Object Component value through its direct path.
Change Sprite Tint Property
Changes exactly one persistent sprite-tint property while preserving every unrelated tint setting.
Change Variable
Changes one declared variable: a Local Variable of this Logic (private to this Logic Component, or to this call of a Function), a Per Instance Variable of the targeted Object (self.name), a Changeable Shared Variable (@self.name, @Guard.name: one value for every instance of that Object), or a Global.
Check Data Row Exists
Checks whether the Data Table has that row.
Check Game State
Runs nested actions while the singular project Game State matches the selected value.
Check Save Exists
True when the named save slot exists — show a “Continue” button only when there is something to continue.
Control Data Row
Adds or updates one Data Table row, or removes it.
Control Menu
Opens one navigable UI menu or closes the named or top menu without changing its world-pause state.
Create Instance
Creates one instance at world XYZ, Self-relative XYZ, or an exact named Coordinate, and names it (Created As).
Declare Variable
Brings a Local Variable into existence.
Delete Save
Deletes one named save slot.
Draw Line
Draws one line with the current Draw Color.
Else
Runs the Else action.
If
Runs its Then branch when its Condition is true.
Load Game
Validates and loads one named save slot.
Load Persistent Value
Reads a device-persisted value, or the Default if none is stored yet, and publishes one typed Action result.
Repeat
Runs its vertical child stack Count times.
Reset Data Table
Restores a Data Table to exactly what was authored in the editor, discarding every runtime change.
Restart Game
Restarts the complete game from its configured start scene.
Return
Ends this run here.
Run Code (JS)
Runs one inline JavaScript snippet in the current event context.
Save Game
Writes the current game state to one named slot.
Save Persistent Value
Writes one device-persistent value under one title-scoped key.
Set Alpha
Sets alpha for the target or game.
Set Data Cell
Writes one cell of a Data Table row (the live game copy, not the authored resource).
Set Draw Color
Sets the color used by later draw actions.
Set Frame
Sets frame for the target or game.
Set Game State
Changes the singular project-wide Game State and runs Game State Changed when the value changes.
Set Input Context Active
Activates or deactivates one Input Context without changing any other active contexts.
Set Logic State
Enables, disables, or toggles one attached Logic on each target instance, firing lifecycle events only for real state transitions.
Set Menu Pause State
Changes only whether the named or top open UI menu pauses the world.
Set Position
Moves the target immediately to a world position, an Object-local offset, a named Coordinate, or a Transform bounding-box anchor.
Set Scale
Sets the Object instance’s live size multipliers.
Set Sprite
Changes the sprite resource.
Set UI Element Visibility
Shows or hides one UI Object.
Set UI Group Visibility
Shows or hides every UI Object with the same non-empty Group value.
Set Visible
Sets visible for the target or game.
Start Recurring Timer
Starts or restarts one saveable named recurring timer.
Stop Recurring Timer
Stops one named recurring timer.
Switch Mode
Sets the Event to One at a time and turns on only the selected Mode.
Trigger Custom Event
Broadcasts one named Custom Event to matching Custom Event listeners.
Trigger Custom Event on Object
Sends one named Custom Event to the selected Object instance without broadcasting it to unrelated Objects.
Tween
Moves one value toward a target over time: any Number, Vec or Color of a Component (self.transform.position, self.transform.opacity, a light’s color, a Data Structure field) or a Variable.
While
Runs its vertical child stack while its Condition stays true.

C.3 Reading Values From Tables

data('table', row, 'column')
the value in one cell: the row by its name or number, the column by its name.
dataRow('table', number)
the name of the row at that number, counting from 0.
dataFind('table', 'column', value)
the number of the first row whose column holds this value.
dataCount('table')
how many rows the table has.