Tiberian Technologies Scripts Reference Revision: 9000
Loading...
Searching...
No Matches
dp88_ar_unitScripts.h
1/* Renegade Scripts.dll
2 Copyright 2013 Tiberian Technologies
3
4 This file is part of the Renegade scripts.dll
5 The Renegade scripts.dll is free software; you can redistribute it and/or modify it under
6 the terms of the GNU General Public License as published by the Free
7 Software Foundation; either version 2, or (at your option) any later
8 version. See the file COPYING for more details.
9 In addition, an exemption is given to allow Run Time Dynamic Linking of this code with any closed source module that does not contain code covered by this licence.
10 Only the source code to the module(s) containing the licenced code has to be released.
11*/
12#pragma once
13
14#include "dp88_ar.h"
15
26class dp88_AR_Rocketeer : public JFW_Key_Hook_Base
27{
28public:
30
31protected:
32 void Created ( GameObject* pObj );
33 void Destroyed (GameObject* pObj);
34 void Custom ( GameObject* pObj, int type, int param, GameObject* pSender );
35 void Timer_Expired ( GameObject* pObj, int number );
36 void KeyHook();
37
38 void Toggle_Flight_Mode ( class SoldierGameObj* pSoldier, bool bState );
39
42 time_t m_lastDeploy;
44
47 int m_minWalkTime;
48 int m_minFlightTime;
50};
51
52
53
54
55/*------------------------
56Mirage Tank Script
57--------------------------*/
58
71class dp88_AR_MirageTank : public ScriptImpClass
72{
73 void Created( GameObject *obj );
74 void Damaged( GameObject *obj, GameObject *damager, float amount );
75 void Killed( GameObject *obj, GameObject *killer );
76 void Custom( GameObject *obj, int type, int param, GameObject *sender );
77 void Timer_Expired( GameObject *obj, int number );
78
79 void setHidden ( GameObject *obj, bool hidden );
80
81 int m_driverID;
82 int m_mirageID;
83 int m_controllerID;
84
87 int m_delay;
88 time_t m_lastActivity;
90};
91
92
93
94
95/*------------------------
96IFV Scripts
97--------------------------*/
98
99class dp88_AR_IFV : public JFW_Key_Hook_Base
100{
101 void Created ( GameObject* obj );
102 void Destroyed ( GameObject *obj );
103 void Custom ( GameObject* obj, int type, int param, GameObject* sender );
104 void Timer_Expired ( GameObject* obj, int number );
105 void KeyHook();
106
107 /* General variables. ID of this object, ID of the pilot, current
108 veterancy level. */
109 int objectID, pilotID, veterancyLevel;
110
111 /* Flags to indicate deployment status and if it's currently deploying */
112 bool isDeployed, isDeploying;
113
114 int deployedAnimFrame; // Animation frame for deployed mode
115 int deployedRookieWeaponPowerupId; // Powerup ID for rookie deployed weapon
116 int deployedVeteranWeaponPowerupId; // Powerup ID for veteran deployed weapon
117 int deployedEliteWeaponPowerupId; // Powerup ID for elite deployed weapon
118
119
120 char defaultWeapon[64]; // Original default model
121 char currentDefaultWeapon[64]; // Current default model
122 char currentWeapon[64]; // Current model
123
124
125
126 // Deploy / undeploy functions
127 void deploy();
128 void undeploy();
129
130 bool nullWeaponGranted; // test to see if this works around stupid FDS bug
131};
132
133
134// IFV driver script
135class dp88_AR_IFVDriver : public ScriptImpClass
136{
137 void Custom ( GameObject* obj, int type, int param, GameObject* sender );
138};
139
140
141
142
143
255{
256 /* -----
257 Events
258 ----- */
259
260 void Created ( GameObject *obj );
261 void Damaged ( GameObject *obj, GameObject *damager, float amount );
262 void Timer_Expired ( GameObject *obj, int number );
263
264 // Custom AI initialisation script overloads
265 virtual void Init( GameObject *obj );
266 virtual void loadSettings( GameObject *obj, bool loadSecondaryFireSettings = true, bool loadBuildingTargetSettings = false );
267
268 // Overload the checkPowerState function to return true when sufficient
269 // charge level exists to provide power
270 virtual bool checkPowerState(GameObject* obj);
271
272 private:
273 /* -----
274 Functions
275 ----- */
276
277 void setSuperchargedState(GameObject* obj, bool state);
278
279 /* -----
280 Variables
281 ----- */
282
283 int m_chargeLevel;
284 bool m_isSupercharged;
285 StringClass m_defaultWeapon;
286 int m_defaultWeaponRange;
287 StringClass m_superchargedWeapon;
288 int m_superchargedWeaponRange;
289
290 // Settings
291 unsigned int m_chargeWarheadID;
292 int m_chargeDuration;
293 int m_chargesPowerOn;
294 int m_chargesSupercharge;
295};
Charged Turret AI.
Definition dp88_customAI.h:715
Apocalypse Rising Mirage Tank.
Definition dp88_ar_unitScripts.h:72
Apocalypse Rising Rocketeer.
Definition dp88_ar_unitScripts.h:27
bool m_bCanDrive
Cached value of SoldierGameObj->Can_Drive_Vehicles()
Definition dp88_ar_unitScripts.h:43
int m_nSoldierID
ID of the infantry unit, since KeyHook doesn't pass an object pointer.
Definition dp88_ar_unitScripts.h:40
time_t m_lastDeploy
Timestamp of the last deploy event (to restrict usage)
Definition dp88_ar_unitScripts.h:42
int m_nVehicleID
ID of the flight vehicle, if it is currently in use.
Definition dp88_ar_unitScripts.h:41
Apocalypse Rising Tesla Coil.
Definition dp88_ar_unitScripts.h:255