CrowdControlEffect

Inherits: Resource < RefCounted < Object

Represents an individual interactivity effect in the CrowdControl system.

Description

CrowdControlEffect defines a single effect that a viewer can trigger in your game, such as giving coins, changing player color, or dealing damage.

Properties

PackedStringArray

category

PackedStringArray()

String

description

""

int

duration

0

String

effect_id

""

Variant

effect_name

null

PackedStringArray

group

PackedStringArray()

bool

inactive

false

String

note

""

Dictionary

parameters

{}

int

price

100

int

quantity_max

1

int

quantity_min

1

Methods

Dictionary

to_json() const


Property Descriptions

PackedStringArray category = PackedStringArray() 🔗

List of categories this effect belongs to.

Note: The returned array is copied and any changes to it will not update the original property value. See PackedStringArray for more details.


String description = "" 🔗

  • void set_description(value: String)

  • String get_description()

Human-readable description of the effect.


int duration = 0 🔗

  • void set_duration(value: int)

  • int get_duration()

Duration of the effect in milliseconds.

A value of 0 usually indicates an instant effect with no lasting duration.


String effect_id = "" 🔗

Unique identifier for this effect.


Variant effect_name = null 🔗

Display name of the effect.


PackedStringArray group = PackedStringArray() 🔗

List of groups this effect belongs to.

Note: The returned array is copied and any changes to it will not update the original property value. See PackedStringArray for more details.


bool inactive = false 🔗

  • void set_inactive(value: bool)

  • bool is_inactive()

Whether the effect is currently inactive.


String note = "" 🔗

Additional notes or internal comments about the effect.


Dictionary parameters = {} 🔗

Dictionary of configurable parameters for the effect.


int price = 100 🔗

  • void set_price(value: int)

  • int get_price()

Cost required to trigger the effect.

Typically expressed in platform-specific currency (e.g., points, coins).


int quantity_max = 1 🔗

  • void set_quantity_max(value: int)

  • int get_quantity_max()

Maximum quantity that can be applied in a single trigger.


int quantity_min = 1 🔗

  • void set_quantity_min(value: int)

  • int get_quantity_min()

Minimum quantity required to trigger the effect.


Method Descriptions

Dictionary to_json() const 🔗

Serializes this CrowdControlEffect into a JSON-compatible dictionary for sending to the CrowdControl API.