Cachable Fact Check Event
An event that triggers when a cachable fact matches a value
Fields
| Field | Type | Default | Description |
|---|---|---|---|
fact | Ref<CachableFactEntry> | — | The cachable fact to check. |
amount | Var<Int> | 0 | The amount that represents the required value to trigger the event. |
operator | ComparisonOperator | EQUAL | The comparison operator to use (EQUAL, GREATER_THAN, LESS_THAN, GREATER_OR_EQUAL, LESS_OR_EQUAL).Values:EQUALGREATER_THANLESS_THANGREATER_OR_EQUALLESS_OR_EQUAL |
checkOnJoin | Boolean | false | If true, the event will check the fact for players when they join. |
checkIntervalSeconds | Long | 10 | Interval in seconds for periodic fact checks when enabled. |
Common TypeWriter fields (criteria, children, triggers, modifiers)
| Field | Type | Default | Description |
|---|---|---|---|
criteria | List<Criteria> | empty | — |
children | List<Ref<AudienceEntry>> | empty | — |
triggers | List<Ref<TriggerableEntry>> | empty | — |
modifiers | List<Modifier> | empty | — |
How to use it
Despite its name this entry is placed in an audience: it watches a counter fact and runs triggers when the value matches.
- The comparison is
factoperatoramount, withoperatorone ofEQUAL,GREATER_THAN,LESS_THAN,GREATER_OR_EQUAL,LESS_OR_EQUAL. - With
checkOnJoinon, the check also runs when a player joins. - Every
checkIntervalSeconds(default10;0disables it) the check runs again for all online players that matchcriteria, and the triggers fire each time the value still matches. Add a modifier that changes the fact, or a criteria that no longer matches, to avoid repeated triggers. - The periodic check stops by itself when no trigger is configured or no online player matches
criteria.