TutorialsPush Lab

Appendix C — Cheat Sheet

Every Event and Action Push Lab - Discovery Workshop uses, with what it does in one line, in Myth’s own words.

C.1 Events

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.
Data Table Changed
Runs once for each change to the selected Data Table, at the end of the step it happened in: a cell set, a row added or removed, the table reset or sorted, or a saved game loaded.
Destroy
Runs when an instance is destroyed.
Focus Lost
Runs once on the first step after the game loses the player’s input focus (the player switches to another window or tab).
Mouse Held
Runs once per game step while the selected mouse button is held anywhere in the game view.
Mouse Press
Runs once when the selected mouse button is newly pressed anywhere in the game view.
Mouse Release
Runs once when the selected mouse button is released anywhere in the game view.
Mouse Wheel
Runs when the mouse wheel scrolls up or down over the game.
Recurring Timer
Runs each time the named recurring timer comes due.
Step
Runs every game step while the instance exists.
Touch Cancelled
Runs once when the device cancels a touch in progress (for example a system gesture or an incoming call), before that touch’s Mouse Release and Mouse Released on Object in the same step, so a cut-off touch can cancel what it was doing.
Variable Changed
Runs once, at the end of a step, after the selected Global Variable changes value.

C.2 Actions

Apply Impulse
Applies one mass-aware impulse, optionally off-center so an object with Allow rotation also spins.
Attach to Parent
Attaches this instance to the nearest live instance of one selected parent Object.
Change Component Value
Changes one mutable Object Component value through its direct path.
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 Exists
True when Applies To still names at least one live instance: a named result (an empty set, or one whose instances were destroyed, is false), an Instance Parameter, or an Instance Output of a Function call.
Control Data Row
Adds or updates one Data Table row, or removes it.
Control Sound
Plays, loops, crossfades, or stops one selected Sound resource.
Create Instance
Creates one instance at world XYZ, Self-relative XYZ, or an exact named Coordinate, optionally with a starting rotation, scale and launch speed, and names it (Variable Name).
Declare Variable
Brings a Local Variable into existence.
Detach from Parent
Keeps this instance at its current world transform, removes its runtime parent, and restores ordinary physics.
Else
Runs the Else action.
Execute Script
Executes one Script resource in the current event context, with recursion and call-depth guards.
For Each Row
Runs its child stack once for each row of a Data Table.
If
Runs its Then branch when its Condition is true.
Load Persistent Value
Reads a device-persisted value, or the Default if none is stored yet, and publishes one typed Action result.
Open Persistent Values File
Opens a file picker for a .mythvalues file and stores its values (filtered by Key Prefix) as persistent values.
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.
Save Persistent Value
Writes one device-persistent value under one title-scoped key.
Save Persistent Values To File
Downloads a small .mythvalues file holding the chosen persistent values.
Set Data Cell
Writes one cell of a Data Table row (the live game copy, not the authored resource).
Set Instance Set
Replaces what an Instance Set (made by Make Instance Set, or an Instance Set Variable) holds, for example with what the Create just before it made.
Set Position
Moves the target immediately to a world position, an Object-local offset, a named Coordinate, or a Transform bounding-box anchor.
Set Rotation
Sets the exact planar rotation in degrees.
Set Spin
Sets how fast the object is turning, in degrees per second.
Set Velocity
Sets the exact horizontal velocity, vertical velocity, or both.
Set Visible
Sets visible for the target or game.
Set Z Order
Sets the exact Z Order used to sort this instance.
Start Recurring Timer
Starts or restarts one saveable 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.

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.
dataFind('table', 'column', value)
the number of the first row whose column holds this value.
dataCount('table')
how many rows the table has.