14#include "dp88_customAI.h"
15#include "dp88_custom_timer_defines.h"
80 void Created( GameObject *obj );
81 void Custom( GameObject *obj,
int type,
int param, GameObject *sender );
82 void Timer_Expired( GameObject *obj,
int number );
83 void Destroyed( GameObject *obj );
91 short team0_countryID;
92 short team1_countryID;
96 char* mirageTank_disguisePresets[3];
108 int attackingTerrorDroneID;
112 void Custom(GameObject *obj,
int type,
int param,GameObject *sender);
113 void Created(GameObject *obj);
114 void Timer_Expired( GameObject *obj,
int number );
115 void Killed(GameObject *obj, GameObject *killer);
116 void Damaged(GameObject *obj, GameObject *damager,
float amount);
117 void Animation_Complete ( GameObject *obj,
const char *animation_name );
130class dp88_AR_Deployable_Infantry :
public JFW_Key_Hook_Base
134 void Created( GameObject *obj );
135 void Killed( GameObject *obj, GameObject *killer );
136 void Destroyed ( GameObject* obj );
138 void Custom( GameObject *obj,
int type,
int param, GameObject *sender );
139 void Timer_Expired( GameObject *obj,
int number );
142 const char* GetArmourType (
int vetLevel );
145 const char* GetWeaponPowerup (
int vetLevel );
148 void Deploy(GameObject* obj);
150 void Undeploy(GameObject* obj);
155 char* undeployedWeapon;
156 int deployedObjectId;
158 int cannotDeployStringId;
159 int cannotDeploySoundId;
166 bool hasRookieWeaponPowerup, hasVeteranWeaponPowerup, hasEliteWeaponPowerup;
169 char undeployedSkinType[128], undeployedArmourType[128];
182class dp88_AR_CLEG :
public ScriptImpClass {
189 void Created(GameObject *obj);
190 void Damaged(GameObject *obj, GameObject *damager,
float amount);
191 void Killed(GameObject *obj, GameObject *killer);
192 void Timer_Expired( GameObject *obj,
int number );
195class dp88_AR_CLEG_target :
public ScriptImpClass {
196 void Created(GameObject *obj);
197 void Damaged(GameObject *obj, GameObject *damager,
float amount);
198 void Killed(GameObject *obj, GameObject *killer);
199 void Timer_Expired( GameObject *obj,
int number );
201 int currentResistance;
202 int lastResistanceCheck;
289 const char* m_animations[3];
290 const char* m_animSounds[3];
295 virtual void Created ( GameObject *obj );
296 virtual void Custom ( GameObject *obj,
int type,
int param, GameObject *sender );
297 virtual void Action_Complete( GameObject *obj,
int action_id, ActionCompleteReason complete_reason );
298 virtual void KeyHook() {};
304 virtual void DriveToOreField ( GameObject *obj );
305 virtual void EnteredOreField ( GameObject *obj, GameObject* oreField );
306 virtual void ExitedOreField ( GameObject *obj, GameObject* oreField );
307 virtual void ReturnToRefinery ( GameObject *obj );
308 virtual void DockAtRefinery ( GameObject *obj );
309 virtual void DockedAtRefinery ( GameObject *obj );
310 virtual void UndockedFromRefinery ( GameObject *obj );
316 MINER_AISTATE_SEARCH_FOR_ORE,
317 MINER_AISTATE_DRIVE_TO_ORE,
318 MINER_AISTATE_COLLECTING_ORE,
319 MINER_AISTATE_RETURN_TO_REFINERY,
320 MINER_AISTATE_DOCK_AT_REFINERY,
321 MINER_AISTATE_UNLOADING_ORE
326 MINER_ACTIONID_DRIVE_TO_ORE,
327 MINER_ACTIONID_RETURN_TO_REFINERY,
328 MINER_ACTIONID_DOCK_AT_REFINERY
338 void UpdateAnimation ( GameObject* pObj, MINER_ANIMID animId );
357 void Created ( GameObject *obj );
358 void Damaged ( GameObject *obj, GameObject *damager,
float amount );
359 void Custom ( GameObject *obj,
int type,
int param, GameObject *sender );
363 void ReturnToRefinery ( GameObject *obj );
364 bool Start_Chronoshift( GameObject *obj );
365 void Do_Chronoshift( GameObject *obj,
int target_zone_id );
366 void Complete_Chronoshift( GameObject *obj );
368 bool CanChronoshiftToLocation ( GameObject* obj, Vector3& location );
372 CMINER_AISTATE_CHRONOSHIFTING = MINER_AISTATE_UNLOADING_ORE+1
387 void Created( GameObject *obj );
449 void Created ( GameObject* pObj );
450 void Detach ( GameObject* pObj );
451 void Entered ( GameObject* pZoneObj, GameObject* pEnterer );
452 void Exited ( GameObject* pZoneObj, GameObject* pExiter );
460 void AddOre (
unsigned int nUnits );
470 unsigned int RemoveOre (
unsigned int nUnits = 1 );
490 void UpdateAnimationFrame();
491 void UpdateAnimationFrame( GameObject* pObj );
495 unsigned int m_nOreUnits;
500 unsigned int m_oreValue;
501 unsigned int m_oreCapacity;
503 const char* m_strAnimation;
504 unsigned int m_nAnimationFullFrame;
505 unsigned int m_nAnimationEmptyFrame;
507 Vector3 m_zoneSizeFull;
520 { m_pParent = pParent; }
526 void Entered( GameObject* pObj, GameObject* pEnterer ) { m_pParent->Entered(pObj, pEnterer); }
527 void Exited( GameObject* pObj, GameObject* pExiter ) { m_pParent->Exited(pObj, pExiter); }
531 void Attach ( GameObject* pObj ) {};
532 void Detach ( GameObject* pObj ) {};
533 void Animation_Complete ( GameObject *pObj,
const char *animation_name ) {};
534 void Created(GameObject* pObj) {};
535 void Destroyed(GameObject* pObj) {};
536 void Killed(GameObject* pObj,GameObject* pKiller) {};
537 void Damaged(GameObject* pObj,GameObject* pDamager,
float amount) {};
538 void Custom(GameObject* pObj,
int type,
int param,GameObject* pSender) {};
539 void Sound_Heard(GameObject* pObj,
const CombatSound & sound) {};
540 void Enemy_Seen(GameObject* pObj,GameObject* pEnemy) {};
541 void Action_Complete(GameObject* pObj,
int action_id,ActionCompleteReason complete_reason) {};
542 void Timer_Expired(GameObject* pObj,
int number) {};
543 void Poked(GameObject* pObj,GameObject* pPoker) {};
547 const char* Get_Name() {
return "dp88_Ore_Field_Observer"; }
580 void Created ( GameObject* pObj );
581 void Timer_Expired ( GameObject* pObj,
int number );
582 void Animation_Complete ( GameObject* pObj,
const char* animationName );
589 unsigned int m_nOreUnits;
590 unsigned int m_interval;
591 const char* m_strAnimation;
606 void Entered( GameObject *obj, GameObject *enterer );
623 void Entered( GameObject *obj, GameObject *enterer );
624 void Exited ( GameObject *obj, GameObject *exiter );
666 void Created ( GameObject *obj );
667 void Killed ( GameObject *obj, GameObject* killed );
668 void Custom ( GameObject *obj,
int type,
int param, GameObject *sender );
672 unsigned int landingZoneCount;
757 void Created( GameObject *obj );
758 void Detach ( GameObject* obj );
759 void Poked ( GameObject *obj, GameObject *poker );
760 void Custom( GameObject *obj,
int type,
int param, GameObject *sender );
761 void Timer_Expired( GameObject *obj,
int number );
762 void SetEnabled ( GameObject* obj,
bool state );
766 Collision_Group_Type m_pilotCachedCollisionGroup;
768 Vector3 pilotDummyPos;
772 void HandleDriverEnter(GameObject* obj, GameObject* pilot, GameObject* vehicle);
773 void HandleDriverExit(GameObject* obj, GameObject* pilot, GameObject* vehicle);
775 void CreateDummy ( GameObject* pilot, Vector3 position,
float facing );
778 void UpdateAnimation(GameObject* obj);
792class dp88_RemoteControlVehicle :
public ScriptImpClass
794 void Created( GameObject *obj );
795 void Custom( GameObject *obj,
int type,
int param, GameObject *sender );
796 void Killed( GameObject *obj, GameObject *killer );
808class dp88_AR_DemoTruck :
public ScriptImpClass {
811 void Created( GameObject *obj );
812 void Custom( GameObject *obj,
int type,
int param, GameObject *sender );
813 void Killed( GameObject *obj, GameObject *killer );
814 void Damaged ( GameObject *obj, GameObject *damager,
float amount );
817 void dp88_AR_DemoTruck::Detonate( GameObject *obj );
834 void Created( GameObject *obj );
835 void Poked ( GameObject *obj, GameObject *poker );
879 void Created( GameObject* pObj );
880 void Damaged( GameObject* pObj, GameObject* pDamager,
float amount );
881 void Killed( GameObject* pObj, GameObject* pKilled );
882 void Timer_Expired ( GameObject* pObj,
int number );
883 void Detach(GameObject* obj);
885 void Landed ( GameObject* pObj );
983 static const int MAX_TOWERS = 20;
984 static int prismTowerCount;
985 static int prismTowerIds[MAX_TOWERS];
992 static void deregisterTower(
int towerId);
993 static void clearTowerMap(
int idx);
994 static void calculateTowerMap();
995 static bool calculateTowerMapPathSearch(
int* sortedConnections,
int numConnections,
int tower1,
int tower2);
1001 static bool CanAssistTower(GameObject* tower1, GameObject* tower2,
int maxRange);
1008 bool isAssistingTower;
1011 int adjacentTowerCount;
1012 int* adjacentTowers;
1019 void Created ( GameObject *obj );
1020 void Damaged ( GameObject *obj, GameObject *damager,
float amount );
1021 void Killed ( GameObject *obj, GameObject *killer );
1022 void Destroyed ( GameObject *obj );
1023 void Custom ( GameObject *obj,
int type,
int param, GameObject *sender );
1024 void Timer_Expired ( GameObject *obj,
int number );
1032 virtual float getPriority( GameObject *obj, GameObject *target );
1038 virtual bool checkTeam( GameObject *obj, GameObject *target );
1041 virtual void attackTarget ( GameObject* obj, GameObject* target,
bool primary );
1042 virtual void attackLocation ( GameObject* obj, Vector3 location,
bool primary );
1043 virtual void stopAttacking ( GameObject* obj );
1046 void StartAssisting(GameObject* obj, GameObject* tower,
float priority);
1047 void StopAssisting(GameObject* obj);
1057 static Vector3 GetAssistAimPoint(GameObject* pTargetTower);
1063 void SendAssistanceRequests(GameObject* obj);
1068 void SendEndAssistanceNotifications(GameObject* obj);
1103 void Created ( GameObject *obj );
1104 void Timer_Expired ( GameObject *obj,
int number );
1105 void Killed ( GameObject *obj, GameObject *killer );
1106 void equaliseHealth( GameObject* obj );
Controller for looped animations using a subset of frames.
Definition LoopedAnimationController.h:31
Charged Turret AI.
Definition dp88_customAI.h:715
AR Chrono Miner Chronoshift Zone.
Definition dp88_ar.h:386
AR Chrono Miner.
Definition dp88_ar.h:351
int objectId
ID of the object we are running on, since Keyhook() does not include the GameObject....
Definition dp88_ar.h:353
int driverId
ID of our current driver, or NULL.
Definition dp88_ar.h:354
Apocalypse Rising Game Controller.
Definition dp88_ar.h:77
AR Paradrop.
Definition dp88_ar.h:875
float m_fallRate
Falling speed at last check.
Definition dp88_ar.h:889
int m_nParachuteModel
ID of the spawned parachute model, if any.
Definition dp88_ar.h:888
unsigned int earth_warhead
ID of the "Earth" warhead.
Definition dp88_ar.h:887
Apocalypse Rising Prism Tower.
Definition dp88_ar.h:978
AR Paradrop Console.
Definition dp88_ar.h:833
Aircraft Landing Zone Animation.
Definition dp88_ar.h:665
Aircraft Landing Zone.
Definition dp88_ar.h:622
Camo Controller.
Definition dp88_misc.h:927
Ore Dump Zone.
Definition dp88_ar.h:604
Ore Field.
Definition dp88_ar.h:446
unsigned int m_myObjId
My own GameObject ID, used by the zone observer callbacks.
Definition dp88_ar.h:494
unsigned int GetOreValue()
Definition dp88_ar.h:480
bool IsSuitableForAI()
Definition dp88_ar.h:486
unsigned int NumOreUnits()
Definition dp88_ar.h:477
bool IsInfinite()
Definition dp88_ar.h:483
void AddOre(unsigned int nUnits)
Definition dp88_ar.cpp:1757
unsigned int RemoveOre(unsigned int nUnits=1)
Definition dp88_ar.cpp:1768
Ore Miner.
Definition dp88_ar.h:271
int m_oreCapacity
Maximum number of mined ore units onboard.
Definition dp88_ar.h:284
float m_oreDumpTime
Time required to dump ore at a refinery.
Definition dp88_ar.h:286
int m_oreValue
Cumulative value of all ore loads onboard.
Definition dp88_ar.h:276
float m_oreMiningTime
Time required to mine one ore unit.
Definition dp88_ar.h:285
int m_oreFieldRand
Used to prevent glitching by entering/exiting an ore field rapidly. 0 = not in ore field.
Definition dp88_ar.h:279
int m_aiState
Current AI state.
Definition dp88_ar.h:273
const char * m_resourceName
Resource name for strings>
Definition dp88_ar.h:287
int m_oreMined
Current number of mined ore loads onboard.
Definition dp88_ar.h:275
int m_oreFieldId
ID of the ore field we are currently mining ore from.
Definition dp88_ar.h:278
bool m_bUseAI
Is AI enabled?
Definition dp88_ar.h:283
Remote Control Vehicle Console.
Definition dp88_ar.h:756
Object health linking script.
Definition dp88_ar.h:1102