Variable¶
Category: Listener Tier: Basic
Purpose¶
Monitors Global or Local variables and triggers when a comparison condition is met.
When To Use¶
Health checks (HP < 20 triggers low health warning)
Score milestones (Score >= 100 triggers achievement)
Ammo management (Ammo == 0 triggers reload)
State machines (State == “attacking” triggers animation)
Resource monitoring (Energy > 50 allows special ability)
Runtime Behavior¶
Is Empty/Is Not Emptycover String length 0, Array empty, Dictionary empty, NIL.In Rangeis numeric and works on the resolved subfield value, so e.g.remaining_seconds In Range [0, 30]fires when a countdown timer enters the last 30 seconds._system_timeis published every frame byGlobalVariablesManager._process- read-only, name-reserved.Transform field extraction keeps Expose’s full-transform variable usable in graph decisions without requiring separate position/rotation/scale variables for every case.
Properties¶
Property |
Type |
Default |
Notes |
|---|---|---|---|
Scope |
option |
Global |
Global: Check shared variables. Local: Check this node’s variables |
Var Name |
variable_name |
Variable to check (Timer dicts and the reserved Global ‘_system_time’ supported) |
|
Field |
option |
Optional Dictionary/Transform subfield. Timer dicts: elapsed/remaining/etc. _system_time: formatted/hms/hm/hour/minute/second/etc. Transform2D/3D: position/rotation/scale/origin/basis axes. |
|
Test |
option |
Equal |
Type of comparison to perform |
Value |
string |
Value to compare against |
|
Min |
float |
0.0 |
In Range: lower bound (inclusive) |
Max |
float |
0.0 |
In Range: upper bound (inclusive) |
Example Use Cases¶
Low Health Warning:
Property(scope=Local, name=HP, value=20, test=Less) -> AND -> Material(red)
// Turn red when health drops below 20
Score Milestone:
Property(scope=Global, name=Score, value=100, test=Greater or Equal) -> AND -> Sound(achievement)
// Play sound when score reaches 100
Ammo Check Before Shooting:
Sample inspector layout removed for compatibility.
State Machine Trigger:
Property(scope=Local, name=State, value=dead, test=Equal) -> AND -> Visibility(false)
// Hide object when state is "dead"