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

dp88 Building Scripts - Base Class More...

#include <dp88_buildingScripts.h>

Protected Member Functions

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)
 
virtual void OnBuildingDestroyed (GameObject *obj)
 

Protected Attributes

int m_parentId
 

Detailed Description

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

This is the base class for all scripts in the dp88_BuildingScripts set except the controller. It handles location of the parent building (where necessary) and parsing all of the custom messages from the parent building.

Member Function Documentation

◆ Custom()

void dp88_buildingScripts_baseClass::Custom ( GameObject * obj,
int type,
int param,
GameObject * sender )
protected

Handles custom messages from the parent building, should not be overridden by derived classes, which should instead override the new OnCustom() stub function if they need to do their own custom processing

◆ OnBuildingCaptured()

virtual void dp88_buildingScripts_baseClass::OnBuildingCaptured ( GameObject * obj,
int team )
inlineprotectedvirtual

Event function called when the building has been captured by a team or become neutral

Reimplemented in dp88_buildingScripts_capturePoint.

◆ OnBuildingDestroyed()

virtual void dp88_buildingScripts_baseClass::OnBuildingDestroyed ( GameObject * obj)
inlineprotectedvirtual

◆ OnBuildingOffline()

virtual void dp88_buildingScripts_baseClass::OnBuildingOffline ( GameObject * obj)
inlineprotectedvirtual

◆ OnBuildingOnline()

virtual void dp88_buildingScripts_baseClass::OnBuildingOnline ( GameObject * obj)
inlineprotectedvirtual

◆ OnCustom()

virtual void dp88_buildingScripts_baseClass::OnCustom ( GameObject * obj,
int type,
int param,
GameObject * sender )
inlineprotectedvirtual

This function is called by Custom() for any custom it has not handled itself

◆ RegisterWithParent()

GameObject * dp88_buildingScripts_baseClass::RegisterWithParent ( GameObject * obj,
const char * preset_name,
int type )
protected

This function should be called in the Created() function of any derived script which is placed on an object other than the one with the dp88_buildingScripts_controller script attached. If no parent is found this will call Destroy_Script() and return false

Member Data Documentation

◆ m_parentId

int dp88_buildingScripts_baseClass::m_parentId
protected

ID of the building controller we belong to