Tiberian Technologies Scripts Reference Revision: 9000
Loading...
Searching...
No Matches
List of all members
dp88_AR_Tesla_Coil Class Reference

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
 
LoopedAnimationControllerm_pLoopedAnimCtrl
 
dp88_AI_ChargedTurret_AnimationObserverm_pAnimationObserver
 

Detailed Description

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

\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

Note
This script does not currently support the use of secondary fire, therefore the parameters relevant to secondary fire are not present.
Parameters
Priority_InfantryBase targetting priority for infantry targets, or 0 to ignore infantry
Splash_InfantryDetermines 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_VehicleBase targetting priority for light vehicle targets, or 0 to ignore light vehicles
Priority_Heavy_VehicleBase targetting priority for heavy vehicle targets, or 0 to ignore heavy vehicles
Priority_VTOLBase targetting priority for flying targets, or 0 to ignore flying targets
Min_Attack_RangeMinimum distance at which the turret can engage enemies when using primary fire
Max_Attack_RangeMaximum distance at which the turret can engage enemies when using primary fire
Animation_ModelOptional 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_BoneIf 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.
AnimationName of the animation which contains the frames for the various charge states
Animation_Idle_Start_FrameFirst frame number for the idle animation, which will loop continually whilst the turret is powered and not currently attacking a target
Animation_Idle_End_FrameFinal frame number for the idle animation
Animation_Unpowered_Start_FrameFirst 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_FrameFinal frame number for the unpowered animation
Animation_Charge_Start_FrameFirst 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_FrameFinal frame number for the charging animation
Charge_SoundOptional sound effect to be played each time the turret starts charging up
Charge_WarheadThe name of a warhead in armor.ini which can be used to charge up this tesla coil
Charge_DurationHow long, in seconds, a charge from a unit lasts will last before it expires.
Charges_SuperchargeThe 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_OnThe 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_PresetThe name of a powerup which grants the weapon preset to be used when the defence is in supercharged mode
Supercharged_Weapon_RangeThe 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_DistancePriority 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_DamagePriority 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_ValuePriority 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_PowerSpecify whether this turret requires base power to operate: 1 to require power, 0 to ignore
DebugSpecify 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_StealthDetermine whether this turret can detect stealthed enemies or not: 1 to enable, 0 to disable
Note
Vehicles are always classified as light vehicles unless they have the dp88_AI_heavyVehicleMarker script attached to them.
Warning
Never leave the Debug parameter enabled when releasing your mod, it will clog up everyones machines with useless text files everywhere... people usually don't like that :D