Skip to main content
ERLC game event triggers let your automations react to everything happening inside your Liberty County server in real time. When a player joins, fires a command, gets killed, or has their team changed, Studio fires the matching trigger block and passes a structured event payload that you can read with the Event Value block. This page covers every game event trigger, its fields, and how to wire them together.

Trigger Blocks

erlc_when_event

Fires whenever a selected in-game event occurs. Use the EVENT_TYPE dropdown to choose which event — or pick * to catch all events in a single automation.

erlc_when_game_command

Fires when a player types a custom in-game command (prefixed with /). Reads the command name and any space-separated arguments.

erlc_when_event — EVENT_TYPE Values

Use the EVENT_TYPE dropdown to filter the events your automation responds to.

erlc_when_game_command

This trigger is dedicated to custom in-game commands. Place the command name (without the /) in the COMMAND field. Studio fires this automation only when a player types that exact command, and makes the command arguments available via erlc_event_value.

Reading Event Data

Once a game trigger fires, use erlc_event_value to extract fields from the event payload. Select a field from the FIELD dropdown to return its value as a string you can pass to other blocks.

erlc_event_field — Filter by Field Value

Use erlc_event_field as a conditional check inside your automation. It compares a chosen field against a value using one of three operators:
Combine erlc_event_field with an If / Else logic block to branch your automation — for example, only sending a welcome message when Team equals Civilian.

Example Automation

The JSON below shows a complete automation that listens for player_joined and reads the joining player’s name.
The erlc_event_value block is only valid inside an automation that starts with a game event trigger. Placing it in a Discord-triggered automation will return an empty value.

Common Patterns

1

Choose your trigger event

Drag an erlc_when_event block onto the canvas and select the EVENT_TYPE that matches what you want to respond to. Use * while prototyping so you can inspect all fields before narrowing down.
2

Extract the fields you need

Attach erlc_event_value blocks and pick the FIELD for each piece of data your logic requires — for example, PlayerName for a welcome message or WantedStars for a warrant alert.
3

Add conditional logic

Use erlc_event_field with equals or contains to gate your actions. Only proceed when the event matches your expected context.
4

Fire your action

Connect a Discord message block, an ERLC command block, or any other action. The event data flows through as variables into the action’s fields.
Selecting * as your EVENT_TYPE in a high-traffic server can cause your automation to fire hundreds of times per minute. Add throttle or filter blocks downstream to avoid hitting rate limits.