|
Tiberian Technologies Scripts Reference Revision: 9000
|
dp88 Building Scripts - Minor Weakpoint More...
#include <dp88_buildingScripts.h>
Protected Member Functions | |
| void | OnBuildingDestroyed (GameObject *obj) |
Protected Member Functions inherited from dp88_buildingScripts_componentBaseClass | |
| void | Detach (GameObject *obj) |
| virtual void | OnDetach (GameObject *obj) |
| void | PlayAnimation (GameObject *obj, const char *animation, int nStartFrame, int nEndFrame, bool bLooped) |
Protected Member Functions inherited from dp88_buildingScripts_baseClass | |
| GameObject * | RegisterWithParent (GameObject *obj, const char *preset_name, int type) |
| void | Custom (GameObject *obj, int type, int param, GameObject *sender) |
| virtual void | OnCustom (GameObject *obj, int type, int param, GameObject *sender) |
| virtual void | OnBuildingOffline (GameObject *obj) |
| virtual void | OnBuildingOnline (GameObject *obj) |
| virtual void | OnBuildingCaptured (GameObject *obj, int team) |
Protected Attributes | |
| bool | m_bIsDestroyed |
Protected Attributes inherited from dp88_buildingScripts_componentBaseClass | |
| LoopedAnimationController * | m_pAnimController |
Protected Attributes inherited from dp88_buildingScripts_baseClass | |
| int | m_parentId |
Attach this script to a building part which should function as a minor weakpoint, which can be attacked by an enemy to disable the building until the weakpoint is repaired. If a building has multiple minor weakpoints they must all be destroyed before the building is disabled and, once disabled, they must all be fully repaired before the building is enabled again.
The exact effects of disabling the building are determined by the building function scripts which are attached to the object with the dp88_buildingScripts_controller attached.
| Building_Controller_Preset | Name of the preset to which the controller script for this building is attached. Note that if there are multiple copies of this preset on the map the script will use the closest instance as its parent. |
| Animation_Name | Optional. The name of an animation to play on this weakpoint in the "alive" state |
| Animation_Start_Frame | Optional. The first frame number to play within the named animation for the "alive" state |
| Animation_End_Frame | Optional. The last frame number to play within the named animation for the "alive" state |
| Animation_Looped | Optional. Whether to loop the animation in the "alive" state. 1 to enable, 0 to disable |
| Destroyed_Animation_Name | Optional. The name of an animation to play on this weakpoint in the "destroyed" state |
| Destroyed_Animation_Start_Frame | Optional. The first frame number to play within the named animation for the "destroyed" state |
| Destroyed_Animation_End_Frame | Optional. The last frame number to play within the named animation for the "destroyed" state |
| Destroyed_Animation_Looped | Optional. Whether to loop the animation in the "destroyed" state. 1 to enable, 0 to disable |
|
protectedvirtual |
Event function called when the building has been destroyed
Reimplemented from dp88_buildingScripts_baseClass.
|
protected |
Tracks whether this weakpoint has been destroyed, so we can trigger the repaired event upon reaching 100% health again