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

Triggers whenever the player takes damage. Note: by the time this fires, the damage is already applied and health has been reduced - this event cannot prevent the original damage. Use it for follow-up effects.
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 when the player is hurt |
- Add stress, pain or bleeding after taking a hit
- Auto-shout or play a sound when hurt
- React in different tiers based on the remaining health
- Fires after the damage has been applied
- Reading "player health" gives the already-reduced value
- Cannot block or mitigate damage; handle damage reduction at the source instead
when hurt
├── play sound "hit"
├── set stress to player stress + 10
└── if player health < 30 then
└── talk "I need medical attention!"
Emits the patch marker //PATCH:OnHurt, injected into the OnHurt() method.
Block ID: cu_when_hurt