Trigger Structure

Triggers are designed around Boolean logic, which is not necessarily intuitive. This article will attempt to explain some basic best practices for trigger structure/creation.

We provide you with different operators and a handy visualization of which conditions are going to be contained within each operator. We provide colored lines located to the left of the operator and its sub-conditions to visualize what conditions are associated with which identifiers. See below: 

First, let's take an overview of the types of operators that you can use in creating a Trigger.

[AND] OPERATOR

This operator will wrap all the conditions below it together. The trigger action will not run unless every condition wrapped by the [AND] operator evaluates to "true".

[NAND] OPERATOR

This operator will wrap all the conditions below it together. The trigger action will not run unless every condition wrapped by the [NAND] operator evaluates to "false".

[OR] OPERATOR

This operator will wrap all the conditions below it together. The trigger action will run if any of the conditions wrapped by the [OR] operator evaluate to "true".

[NOR] OPERATOR

This operator will wrap all the conditions below it together. The trigger action will run if any of the conditions wrapped by the [NOR] operator evaluate to "false".

Usage

The above-listed operators do not need to be used in isolation. You can combine operators to perform very specific tasks. Often, when crafting your triggers, it will be necessary to use more than one operator.

Notably, operators can contain another operator. See below for an example of "nested" operators:

Notice that all conditions and operators are wrapped by the initial [AND] operator. That means that all subsequent conditions and operators must evaluate to "true" before the trigger action will run. In the example above, there is an [OR] operator nested under the [AND] operator. In the example, if the player has a VAC ban OR more than 0 Game bans, the [OR] operator will return a "true" result, allowing the [AND] operator to proceed onto the next condition evaluation. 

Important: You do not need to add a new operator for every condition. See the above image for proper trigger structure.

For an extremely in-depth guide on this topic, consider reading up on "Truth Tables".

Still need help? Contact Us Contact Us