Skip to content

Your first action

An action is a ready-made step. Hengo ships hundreds of them, and writing behaviour is mostly picking the right ones and filling in their fields.

Click the Start cell on the Playing entry node. A search opens: type what you want in plain words, not the function name. Search for Print Value and pick it.

Clicking the Start cell and picking Print Value from the search.

It lands as a card wired to the cell, with a grey Add action node after it. That node is always the end of a chain: click it and the next step goes after this one.

The card wired to Start, with the Add action node ending the chain.

Each card shows its values as chips, one per field. Click the Value chip and type hello from Hengo. Enter confirms, Esc cancels.

Editing the Value chip in place.

Reading a card is meant to need no clicks: icon and name on the left, then every field it holds. The other two things that react to a click are the input pin on a field, which is page 6, and the three dots, which open the card menu.

Two entries of that menu earn their keep from day one:

  • Rename changes only the label on the card. Naming an Is Near card arrived? makes the state read like a sentence, and it is the cheapest documentation there is.
  • Disable keeps the card and its values but emits nothing, which is how a debug step gets parked instead of deleted and rebuilt.
Renaming a card, then disabling it.

The rest of the menu, moving, replacing and reordering, is in Actions on a State. The keyboard does the same: W and S move the selected step, Ctrl+D duplicates, Delete removes.

Press Compile All in the top bar. Hengo saves the graph and writes res://hengo/scripts/my_sprite.gd. Attach that file to the Runner node and press play: the line prints once, on enter, because you put it on Start.

Compile All, the script attached to Runner, and the line printing on play.