|
Tiberian Technologies Scripts Reference Revision: 9000
|
Health Regeneration. More...
#include <dp88_misc.h>
Attach this script to a unit to enable it to regenerate health and armour hitpoints, up to a configurable % of its maximum hitpoints. Additionally it can also be configured to only repair hitpoints when not in combat, forcing the player to escape from battle or defeat their opponent before they begin regenerating their hitpoints.
This script is compatible with the dp88_veterancyUnit script and includes settings for alternative regeneration rates at higher veterancy levels, although it also works as a standalone script.
| Hitpoints | The amount of hitpoints to repair each interval |
| Interval | The number of seconds between each repair interval |
| Warhead | The warhead to use when applying repair damage. If this is not set it will apply raw repairs without any warhead scaling. Note that the warhead must have a negative rating vs the unit skin and armour types otherwise the unit will actually take damage every interval |
| Max_Percent | The maximum percentage of the units total hitpoints that can be repaired, set this to 100 to allow the unit to be repaired completely |
| Damage_Timeout | The number of seconds to wait after the last damage event before regeneration is allowed. Set this to 0 to allow regeneration whilst in combat |
| Hitpoints_Veteran | The amount of hitpoints to repair when the unit is promoted to veteran. Only applicable when used alongside the dp88_veterancyUnit script |
| Hitpoints_Elite | The amount of hitpoints to repair when the unit is promoted to veteran. Only applicable when used alongside the dp88_veterancyUnit script |
| Mode | Added in 4.2, this is a bitflag which controls which hitpoints the script should heal. See the table below for the available modes. |
| Mode | Target |
|---|---|
| 1 | Health of this object |
| 2 | Armour of this object |
| 4 | Health of the vehicle this object is driving (only if attached to a soldier) |
| 8 | Armour of the vehicle this object is driving (only if attached to a soldier) |
| 16 | Health of the vehicle this object is a passenger in (only if attached to a soldier) |
| 32 | Armour of the vehicle this object is a passenger in (only if attached to a soldier) |
| 64 | Health of the driver of this object (only if attached to a vehicle) |
| 128 | Armour of the driver of this object (only if attached to a vehicle) |
| 256 | Health of the passengers of this object (only if attached to a vehicle) |
| 512 | Armour of the passengers of this object (only if attached to a vehicle) |
| Mode | Cap |
|---|---|
| 1 | Capped at 75 health, ignores armour |
| 2 | Capped at 75 armour, ignores health |
| 3 (1+2) | Capped at 150 hitpoints (health+armour) |