Commit f7c6322
authored
Health with shield (new example) (#374)
Manage health points including a protective shield and armor. Health can be assigned to players, enemies, NPCs, or even inanimate objects such as breaking doors and mining rocks.
Damage calculations are performed in this order:
Incoming Damage -> Is Damage Cooldown active? -> Chance to Dodge -> Flat Damage Reduction -> Percent Damage Reduction -> Damage to Shield -> Damage to Health
How to use:
- Set desired values in behavior properties
- To apply damage use “Apply damage to an object”
- To heal health, use “Heal object” action
- To activate the shield, use “Activate shield” action
- Health and shield regeneration will happen automatically based on properties
Tips:
- While damage cooldown is active, no damage will be applied to health or shield (the object is invincible)
- Try using the “Blink” extension while damage cooldown is active
- Use the “Is just damaged” or "Is just healed" conditions to trigger sound and visual effects
Health properties:
- Starting health points
- Maximum health points. Use "0" for no maximum
- Damage cooldown (seconds) Use "0" for no cooldown
- Rate of health regeneration (points per second)
- Delay before health regeneration starts after being hit (seconds)
- Allow heals to increase health above max health (regen will never exceed max health)
Shield properties:
- Max shield points. Use "0" for no maximum
- Duration of shield (seconds) Use "0" to make shield permanent
- Rate of shield regeneration (points per second)
- Delay before shield regeneration starts after being hit (seconds)
- Block excess damage when shield is broken (yes/no)1 parent 72b0b9f commit f7c6322
File tree
27 files changed
+29030
-0
lines changed- examples/health-with-shield
- assets
- audio
- images
27 files changed
+29030
-0
lines changedLoading
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
0 commit comments