-
Notifications
You must be signed in to change notification settings - Fork 0
cu_when_update en
mouse114514 edited this page Sep 12, 2026
·
1 revision

Triggers every game tick (~60 times per second). Use it for logic that must update continuously: monitoring player state, applying ongoing effects, or changing values over time. Because it fires so often, keep only lightweight blocks inside.
This is a hat block: it must be placed at the top of a script.
This block has no parameter slots.
| Connection | Type | Description |
|---|---|---|
| Top | - | hat block, cannot connect |
| Bottom | Statement | connected blocks run once per frame |
- Monitor player health, hunger or temperature each frame and react when below a threshold
- Ongoing regen/damage, poison or stress accumulation effects
- Cyclic "swaying" logic
Roughly 60 executions per second. Avoid:
- heavy math or deep loops
- spawning/destroying objects frequently
- complex string operations
on every frame
├── if player hunger < 20 then
│ └── talk "I'm starving!"
└── if player temperature > 39 then
└── set pain to player pain + 0.1
Emits the patch marker //PATCH:Update, injected into the Update() method.
Block ID: cu_when_update