|
Tiberian Technologies Scripts Reference Revision: 9000
|
Object health linking script. More...
#include <dp88_ar.h>
This is a simple script that links together the health and armour states of two different objects, keeping them in constant sync. This is useful when an ingame entity is made up of two seperate game objects, such as the AI controlled War Miner in Apocalypse Rising which spawns a seperate gun turret to allow the logic for the turret and the miner to execute on seperate objects and avoid conflicts between the attack and move-to actions.
The script works on a parent/child basis, whereby the object this script is attached to is the child and the parent is the object whose ID is specified in the script parameters. Upon creation the script will inherit the maximum and current values of the parents health and armour states, however it will maintain it's own skin and armour types, thus allowing for a child object to be either more or less resistant to damage than it's parent, allowing the creation of strong or weak points in the overall entities defences.
This script is usually attached to dynamically created objects by other scripts and it's unlikely to be attached to anything directly via LevelEdit.
| parentObjectId | ID of the parent game object with which this objects health and armour will be linked |