Skip to main content

Counter Persistent Device

The counter_persistent_device extends the base counter device by using persistent storage to maintain counter values across sessions. The following are the editable properties that you can modify:

Properties

Triggers

Type: []session_counter_trigger
An array of counter triggers that modify the counter value.

OnCompareTriggers

Type: []session_counter_comparison_trigger
An array of comparison triggers that evaluate the counter value and fire associated triggers when conditions are met.

OnChangeTrigger

Type: trigger_device
A trigger device that is activated whenever the counter value changes.

InitialCount

Type: int
The initial counter value.

PerPlayer

Type: logic
Determines whether the counter is tracked individually for each player (true) or globally (false).

CounterKey

Type: string
A key identifier used to store and retrieve the persistent counter value.
Default: "coin"