Tiberian Technologies Scripts Reference Revision: 9000
Loading...
Searching...
No Matches
Protected Member Functions | List of all members
dp88_buildingScripts_majorWeakpoint Class Reference

dp88 Building Scripts - Major 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)
 

Additional Inherited Members

- Protected Attributes inherited from dp88_buildingScripts_componentBaseClass
LoopedAnimationControllerm_pAnimController
 
- Protected Attributes inherited from dp88_buildingScripts_baseClass
int m_parentId
 

Detailed Description

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

Attach this script to a building part which should function as a major weakpoint, which can be attacked by an enemy to destroy the building. If a building has multiple major weakpoints they must all be destroyed before the parent building is destroyed.

Precondition
There must be a warhead of type "Death" defined in armor.ini which can cause damage to the object this script is attached to otherwise it will not be destroyed when the parent building gets killed.
Parameters
Building_Controller_PresetName 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_NameOptional. The name of an animation to play on this weakpoint
Animation_Start_FrameOptional. The first frame number to play within the named animation
Animation_End_FrameOptional. The last frame number to play within the named animation
Animation_LoopedOptional. Whether to loop the animation. 1 to enable, 0 to disable
Dead_PresetOptional. The name of a preset to spawn in place of this weakpoint when it has been destroyed
Note
If you want a more complex animation with multiple damage levels you can leave the animation parameters in this script blank and use a script such as dp88_damageAnimation to provide more control over the weakpoint animation.

Member Function Documentation

◆ OnBuildingDestroyed()

void dp88_buildingScripts_majorWeakpoint::OnBuildingDestroyed ( GameObject * obj)
protectedvirtual

Event function called when the building has been destroyed

Reimplemented from dp88_buildingScripts_baseClass.