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

Script base class with support for multiple key hooks. More...

#include <engine_tt.h>

Public Member Functions

void Detach (GameObject *obj)
 
void Destroyed (GameObject *obj)
 
void InstallHook (const char *logicalKey, GameObject *obj)
 
void RemoveHook (const char *logicalKey, GameObject *obj)
 
virtual void KeyHook (const char *logicalKey)=0
 

Detailed Description

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

This class is a modified variant of JFW_Key_Hook_Base with support for multiple keyhooks being installed simultaneously in a single script. Keyhooks are added and removed by name and the callback function will now contain the name of the hook that triggered

Member Function Documentation

◆ Destroyed()

void MultiKeyHookScriptImpClass::Destroyed ( GameObject * obj)

Overloaded from ScriptImpClass to call Detach, if a derived class also overrides this that class must ensure it calls this base class function in it's own implementation

◆ Detach()

void MultiKeyHookScriptImpClass::Detach ( GameObject * obj)

Overloaded from ScriptImpClass to call Detach, if a derived class also overrides this that class must ensure it calls this base class function in it's own implementation

◆ InstallHook()

void MultiKeyHookScriptImpClass::InstallHook ( const char * logicalKey,
GameObject * obj )

Installs a hook on the named logical key for the player who is controlling the specified infantry object. It is safe to call this multiple times with the same key name, duplicates will not be created

◆ KeyHook()

virtual void MultiKeyHookScriptImpClass::KeyHook ( const char * logicalKey)
pure virtual

Called when any of the keyhooks bound to the object are triggered

◆ RemoveHook()

void MultiKeyHookScriptImpClass::RemoveHook ( const char * logicalKey,
GameObject * obj )

Removes any hook on the named logical key for the player who is controlling the specified infantry object