Skip to content

On Key Press

Group
Events
In the node menu
Events › On Key Press
Where it can be used
Scheme graphs

An On Key Press node holds the flow until the player of the chosen actor presses a key, or lets it go. Then it continues through Pressed.

It only listens when a player on this machine plays that actor. If nobody does, the flow goes on through Not Player at once. There is no waiting.

The key node of the demo scheme Call to the Ring (Drafts/schemes/14-call-to-the-ring.json). Both of its outputs lead to a Stop Wait node.

Use it when a scheme needs a key from the player, such as pressing Space in time. Link Not Player to what should happen when there is no one at this machine to press it.

Use Show Dialogue instead when the player should pick from written choices.

  • With no key chosen, the card warns that the node never continues for a player.
  • The key is read through the legacy Input Manager, as the Key tooltip says.
  • A key pressed while the scheme is paused is kept and handled when it is resumed.
  • When the chosen actor is not available, the flow stops here.
  • The actor is read when the node first runs. A load does not change whose key it waits for.
LabelDraft keyTypeDefaultShown if, tooltip and notes
Player IsActorActorRef"Conspirator"The node only waits for the key when the player on this machine plays this actor.
KeyKeyenum (KeyCode member name)"Space"The key, read through the legacy Input Manager.
WhenKind
  • Down (Pressed)
  • Up (Released)
"Down"
  1. Pressed
  2. Not Player
"type"
"On Key Press"
"set" keys
Actor, Key, Kind
"then" keys
"Pressed", "Not Player"
"<alias>": {
"type": "On Key Press",
"then": { "Pressed": "<alias>", "Not Player": "<alias>" }
}