Skip to content

PauseGroup

Makes its entity and everything inside it a group that can be paused on its own while the rest of the game runs on: a match-3 minigame on an arcade cabinet, one player’s half of a split screen, the world behind a shop. While it’s Paused, nothing in the group moves, falls, animates, emits, counts down, spawns, shoots, runs its scripts or takes the player’s input; it’s still drawn, and still solid to what’s outside it. Its Pause, Resume and Toggle actions let a Trigger, a wire or a script do it with no code, and a switch or a wire into its Power runs it while on and pauses it while off. A panel or a dialogue can pause a group too, while it’s open or being said (see Panel.Pauses and Dialogue.Pauses).

Paused groups are worked out on every step from what’s paused then, so rewinding puts them back as they were. In a network game the host runs it, as it runs the rest of the game.

Works with: Trigger (pausing and resuming it when a message arrives)

Each is listed as its key in the scene file and the MCP tools, then its kind of value, its default and what it does.

  • paused: true or false = false. Whether the group is held still now. Tick it to start the scene with it paused; scripts and the Pause and Resume actions set it. A switch powering it unticks it while on, and ticks it while off. (Field: on or off.)
  • pauseMessage: text = null. A message sent with Game.Send as it pauses, e.g. “MinigamePaused”. (Names a message.) (Field: a name.)
  • resumeMessage: text = null. A message sent with Game.Send as it starts again. (Names a message.) (Field: a name.)

What anything can make it do with no code: a Trigger’s do when its message arrives, a Contraptions Wire’s input as its signal comes on, a script’s Game.Do(entity, “Name”).

  • Pause. Holds the group still, from the start of the next step.
  • Resume. Starts the group again, from the start of the next step.
  • Toggle. Pauses the group if it’s running, and starts it again if it’s paused.

What anything can read with no code: a Counter’s, Bar’s or Text’s output, a Contraptions Wire’s output as its signal; Text shows names too, the rest read numbers, true as 1.

  • Paused (true or false). Whether the group is held still now. Tick it to start the scene with it paused; scripts and the Pause and Resume actions set it. A switch powering it unticks it while on, and ticks it while off.

Scripts use it as PauseGroup: its methods, events and values that aren’t saved with the scene.