Gameplay as when, if, then sentences, with no code.
Logic lives in the Systems workspace. A rule is one sentence: when an event happens, if some conditions hold, then do some actions. Rules run wherever your game runs, in Preview and in the published game, and in multiplayer their results reach every player.
| Event | Fires |
|---|---|
| Round starts | At the start of a round or session. |
| Round ends | When a round ends. |
| Player joins | When a player connects. |
| Player leaves | When a player disconnects. |
| Score changes | Whenever a score changes. |
| Player enters zone | When a player enters a trigger zone. |
| Player leaves zone | When a player leaves a trigger zone. |
| Every second | Once a second, for timers and checks. |
A rule can have no conditions (Always) or several. Each compares a fact with a value using is, is not, is below, is at most, is above or is at least.
| Fact | What it reads |
|---|---|
| Round number | The current round. |
| Team scores | Either team's score in a Versus game. |
| Player count | How many players are connected. |
| Event team, Event zone, Event player | Details of the event that fired the rule. |
| Match variable | A named number your rules set. |
| Item count | How many of a named item the player holds. |
| Quest status | Inactive, active, complete or failed. |
| Action | Effect |
|---|---|
| Announce | Shows a message to players. |
| Set variable, Add to variable | Writes a named match variable. |
| Emit event | Fires a custom event other rules can listen for. |
| Give item, Take item | Changes the player's inventory, using items from Game Data. |
| Start, Complete, Fail quest | Changes a quest's status. |
| Win game, Lose game | Ends the match with a result screen. |
In Scene, place a trigger and give it a zone id, for example skiff_bay. In a 2D project, place a trigger in Pixel Studio\'s Place view and give it an event name.
In Logic, add a rule. Set When to Player enters zone. Add an If: Event zone is skiff_bay. Add a Then, for example Announce.
Press Preview and walk into the zone. The rule fires and the announcement appears in the HUD feed.
Quest status still works inside rules as a condition and an action; what is not yet live is showing quest progress to the player.
For more than rules can express, see Code and scripting.