|
Tiberian Technologies Scripts Reference Revision: 9000
|
Apocalypse Rising Tesla Coil. More...
#include <dp88_ar_unitScripts.h>
Additional Inherited Members | |
Public Member Functions inherited from dp88_customAI | |
| virtual void | ResetAllActions (GameObject *obj) |
Protected Member Functions inherited from dp88_AI_ChargedTurret | |
| virtual void | attackTarget (GameObject *pSelf, GameObject *pTarget, bool primary) |
| virtual void | attackLocation (GameObject *pSelf, Vector3 location, bool primary) |
| virtual void | StartCharging (GameObject *pSelf) |
| virtual void | StartDischarging (GameObject *pSelf) |
| virtual GameObject * | GetAnimationObject (GameObject *pSelf) |
| virtual void | ApplyIdleAnimation (GameObject *pSelf) |
Protected Attributes inherited from dp88_AI_ChargedTurret | |
| unsigned int | m_myObjId |
| My own GameObject ID, used by the observer callbacks. | |
| bool | m_bIsCharging |
| bool | m_bIsDischarging |
| bool | m_bIsPreReloading |
| int | m_chargeAnimObjId |
| bool | m_bPowerState |
| LoopedAnimationController * | m_pLoopedAnimCtrl |
| dp88_AI_ChargedTurret_AnimationObserver * | m_pAnimationObserver |
\arscript
Based on my standard charged turret AI, this adds additional logic to allow the defence to be both powered up in the absence of base power and supercharged to deal additional damage by switching to a second weapon preset (which should be setup to deal more damage than the normal weapon preset).
The Tesla Coil can be powered up and supercharged by shooting it with a specific warhead defined in the script parameters. Each time the coil is hit by a weapon of that warhead will add 1 to the charge level. Note that each unit can only charge the defence at most once a second and multiple units may work together to increase the charge level.
For more information about the charge up logic see the documentation for dp88_AI_ChargedTurret
| Priority_Infantry | Base targetting priority for infantry targets, or 0 to ignore infantry |
| Splash_Infantry | Determines if we should try to damage infantry with splash instead of hitting them directly. This is useful for slow / inaccurate weapons which do splash damage: 1 to enable, 0 to disable |
| Priority_Light_Vehicle | Base targetting priority for light vehicle targets, or 0 to ignore light vehicles |
| Priority_Heavy_Vehicle | Base targetting priority for heavy vehicle targets, or 0 to ignore heavy vehicles |
| Priority_VTOL | Base targetting priority for flying targets, or 0 to ignore flying targets |
| Min_Attack_Range | Minimum distance at which the turret can engage enemies when using primary fire |
| Max_Attack_Range | Maximum distance at which the turret can engage enemies when using primary fire |
| Animation_Model | Optional name of a W3D model file to spawn and attach to the turret upon which the charge animations defined in this script will be applied. This allows the turret itself to be running a different set of animations, such as damage states via dp88_damageAnimation |
| Animation_Model_Bone | If you specify an Animation_Model above then you must also specify the a bone on the parent to which that model should be attached. This allows the animation model to be moved by the animation set executing on the turret. |
| Animation | Name of the animation which contains the frames for the various charge states |
| Animation_Idle_Start_Frame | First frame number for the idle animation, which will loop continually whilst the turret is powered and not currently attacking a target |
| Animation_Idle_End_Frame | Final frame number for the idle animation |
| Animation_Unpowered_Start_Frame | First frame number for the unpowered animation, which will loop continually whilst the turret is in the unpowered state. This is not used if Requires_Power is disabled (see below). |
| Animation_Unpowered_End_Frame | Final frame number for the unpowered animation |
| Animation_Charge_Start_Frame | First frame number for the charging animation, which will be played once each time the turret reloads its weapon. Once this animation completes the turret will fire again, therefore the length of this animation must be greater than the weapon reload time. |
| Animation_Charge_End_Frame | Final frame number for the charging animation |
| Charge_Sound | Optional sound effect to be played each time the turret starts charging up |
| Charge_Warhead | The name of a warhead in armor.ini which can be used to charge up this tesla coil |
| Charge_Duration | How long, in seconds, a charge from a unit lasts will last before it expires. |
| Charges_Supercharge | The charge level required to supercharge the defence, causing it to switch to the supercharged weapon preset. Note that if base power is disabled the number of charges required is this value plus the value of the Charges_Power_On parameter (see below) |
| Charges_Power_On | The charge level required to provide power to the defence when the base power is offline. If this charge level is reached the defence will operate as normal until the charge level drops below the required threshold again |
| Supercharged_Weapon_Powerup_Preset | The name of a powerup which grants the weapon preset to be used when the defence is in supercharged mode |
| Supercharged_Weapon_Range | The maximum attack range to use when the defence is in supercharged mode, this overrides the Max_Attack_Range parameter to allow the defence weapon to target enemies at a greater distance whilst it is using the supercharged weapon |
| Modifier_Distance | Priority modification to apply based on distance to target. Higher values will favour targets which are closer to the turret, good for less accurate weapons |
| Modifier_Target_Damage | Priority modification to apply based on damage a target has already sustained. Higher values will favour targets which have already been damaged in combat, picking them off first |
| Modifier_Target_Value | Priority modification to apply based on the value of the target. Higher values will favour targets with a higher purchase cost, good for hard hitting weapons |
| Requires_Power | Specify whether this turret requires base power to operate: 1 to require power, 0 to ignore |
| Debug | Specify whether to produce a debug logfile about the turrets targetting decisions, this is useful for fine tuning your base priorities and modifiers: 1 to enable, 0 to disable |
| Detects_Stealth | Determine whether this turret can detect stealthed enemies or not: 1 to enable, 0 to disable |