Mechanic
setMaxHealth
Sets the target's max health
Aliases
setMaxHp
Configuration Fields (2)
| Name | Type | Default | Description |
|---|---|---|---|
| amount a | PlaceholderDouble | 1 | The max health value used by the mechanic |
| mode m | Mode | STATIC | How to apply max health: STATIC or SCALE |
Examples & Notes
Examples
This example would simply set the new max health of the entity to 5. If the new max health is lower than the entity’s current health, the current health will be set to the new max health.
Skills:
- setmaxhealth{amount=5;mode=STATIC} @self ~onInteract
- ...
This example would increase the new max health of the mob to 5 and scale it’s remaining HP up as well. If the entity has 15/20 health and is then interacted with, instead of the new health being 5/5 it would become 3/5.
Skills:
- setmaxhealth{amount=5;mode=SCALE} @self ~onInteract
- ...
Universal Mechanic Options
- Author:
- Ashijin
