Tiberian Technologies Scripts Reference Revision: 9000
Loading...
Searching...
No Matches
List of all members
dp88_linkHealth Class Reference

Object health linking script. More...

#include <dp88_ar.h>

Detailed Description

Author
Daniel Paul (danpa.nosp@m.ul88.nosp@m.@yaho.nosp@m.o.co.nosp@m..uk)

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.

Parameters
parentObjectIdID of the parent game object with which this objects health and armour will be linked
Note
You can link multiple child objects to a single parent object to create complex entities which consist of many parts, but you should always ensure the same object is designated as the parent to avoid conflicts between the scripts.