I've re-enabled Laser Burton for the Laser General and decided to release the code. Have fun with him
Code:
Object Lazr_AmericaInfantryLaserBurton
; *** ART Parameters ***
SelectPortrait = SALBur_L
ButtonImage = SALBur
UpgradeCameo1 = Upgrade_AmericaAdvancedTraining
UpgradeCameo2 = Upgrade_AmericaChemicalSuits
Draw = W3DModelDraw ModuleTag_01
OkToChangeModelColor = Yes
; idle
DefaultConditionState
Model = AIHERO_SKN
IdleAnimation = AIHERO_SKL.AIHERO_STA 0 25
IdleAnimation = AIHERO_SKL.AIHERO_IDA
IdleAnimation = AIHERO_SKL.AIHERO_IDB
AnimationMode = ONCE
TransitionKey = TRANS_Stand
WeaponFireFXBone = PRIMARY Muzzle
WeaponMuzzleFlash = PRIMARY MuzzleFX
WeaponMuzzleFlash = SECONDARY NONE
HideSubObject = MUZZLEFX01
End
; injured idle
ConditionState = REALLYDAMAGED
IdleAnimation = AIHERO_SKL.AIHERO_ISTA 0 30
IdleAnimation = AIHERO_SKL.AIHERO_IIDA
IdleAnimation = AIHERO_SKL.AIHERO_IIDB
AnimationMode = ONCE
TransitionKey = TRANS_StandInjured
End
TransitionState = TRANS_Stand TRANS_StandInjured
Animation = AIHERO_SKL.AIHERO_ISTAHIT
AnimationMode = ONCE
End
; moving
ConditionState = MOVING
Animation = AIHERO_SKL.AIHERO_RNA 26
AnimationMode = LOOP
Flags = RANDOMSTART
TransitionKey = TRANS_Walking
ParticleSysBone = None InfantryDustTrails
HideSubObject = MUZZLEFX01
End
AliasConditionState = MOVING FIRING_A
AliasConditionState = MOVING BETWEEN_FIRING_SHOTS_A
AliasConditionState = MOVING RELOADING_A
AliasConditionState = MOVING FIRING_B
AliasConditionState = MOVING BETWEEN_FIRING_SHOTS_B
AliasConditionState = MOVING RELOADING_B
; injured moving
ConditionState = MOVING REALLYDAMAGED
Animation = AIHERO_SKL.AIHERO_IRNA 26
AnimationMode = LOOP
Flags = RANDOMSTART
TransitionKey = TRANS_WalkingInjured
ParticleSysBone = None InfantryDustTrails
HideSubObject = MUZZLEFX01
End
AliasConditionState = MOVING FIRING_A REALLYDAMAGED
AliasConditionState = MOVING BETWEEN_FIRING_SHOTS_A REALLYDAMAGED
AliasConditionState = MOVING RELOADING_A REALLYDAMAGED
AliasConditionState = MOVING FIRING_B REALLYDAMAGED
AliasConditionState = MOVING BETWEEN_FIRING_SHOTS_B REALLYDAMAGED
AliasConditionState = MOVING RELOADING_B REALLYDAMAGED
; Firing animation
ConditionState = FIRING_A
Animation = AIHERO_SKL.AIHERO_ATA
AnimationMode = ONCE
AnimationSpeedFactorRange = 1.5 1.5
TransitionKey = TRANS_FiringA
End
ConditionState = BETWEEN_FIRING_SHOTS_A
Animation = AIHERO_SKL.AIHERO_ATA
AnimationMode = MANUAL
Flags = START_FRAME_LAST
WaitForStateToFinishIfPossible = TRANS_FiringA
End
AliasConditionState = RELOADING_A
; Injured Firing animation
ConditionState = FIRING_A REALLYDAMAGED
Animation = AIHERO_SKL.AIHERO_IATA
AnimationMode = ONCE
AnimationSpeedFactorRange = 1.5 1.5
TransitionKey = TRANS_FiringAInjured
End
ConditionState = BETWEEN_FIRING_SHOTS_A REALLYDAMAGED
Animation = AIHERO_SKL.AIHERO_IATA
AnimationMode = MANUAL
Flags = START_FRAME_LAST
WaitForStateToFinishIfPossible = TRANS_FiringAInjured
End
AliasConditionState = RELOADING_A REALLYDAMAGED
TransitionState = TRANS_FiringA TRANS_FiringAInjured
Animation = AIHERO_SKL.AIHERO_IATAHIT
AnimationMode = ONCE
End
; Placing charge animation
ConditionState = UNPACKING
Animation = AIHERO_SKL.AIHERO_ATB1
AnimationMode = ONCE
End
AliasConditionState = MOVING UNPACKING
; Injured Placing charge animation
ConditionState = UNPACKING REALLYDAMAGED
Animation = AIHERO_SKL.AIHERO_IATB1
AnimationMode = ONCE
End
AliasConditionState = MOVING UNPACKING REALLYDAMAGED
; Stab animations
ConditionState = PREATTACK_B
Animation = AIHERO_SKL.AIHERO_ATC
AnimationMode = ONCE
TransitionKey = TRANS_Stabbing
HideSubObject = MUZZLEFX01
End
AliasConditionState = PREATTACK_B MOVING
AliasConditionState = PREATTACK_B FIRING_B
AliasConditionState = PREATTACK_B BETWEEN_FIRING_SHOTS_B
ConditionState = FIRING_B
Animation = AIHERO_SKL.AIHERO_ATC
AnimationMode = MANUAL
Flags = START_FRAME_LAST
TransitionKey = TRANS_Stabbing
HideSubObject = MUZZLEFX01
End
AliasConditionState = BETWEEN_FIRING_SHOTS_B
AliasConditionState = RELOADING_B
TransitionState = TRANS_Stabbing TRANS_Stand
Animation = AIHERO_SKL.AIHERO_ATC2
AnimationMode = ONCE
End
; Injured Stab animations
ConditionState = PREATTACK_B REALLYDAMAGED
Animation = AIHERO_SKL.AIHERO_IATC1
AnimationMode = ONCE
TransitionKey = TRANS_StabbingInjured
HideSubObject = MUZZLEFX01
End
AliasConditionState = PREATTACK_B MOVING REALLYDAMAGED
AliasConditionState = PREATTACK_B FIRING_B REALLYDAMAGED
AliasConditionState = PREATTACK_B BETWEEN_FIRING_SHOTS_B REALLYDAMAGED
ConditionState = FIRING_B REALLYDAMAGED
Animation = AIHERO_SKL.AIHERO_IATC2
AnimationMode = MANUAL
Flags = START_FRAME_LAST
TransitionKey = TRANS_StabbingInjured
HideSubObject = MUZZLEFX01
End
AliasConditionState = BETWEEN_FIRING_SHOTS_B REALLYDAMAGED
AliasConditionState = RELOADING_B REALLYDAMAGED
TransitionState = TRANS_StabbingInjured TRANS_StandInjured
Animation = AIHERO_SKL.AIHERO_IATC2
AnimationMode = ONCE
End
; cheering
ConditionState = SPECIAL_CHEERING
Animation = AIHERO_SKL.AIHERO_CHA
AnimationMode = ONCE
End
; injured cheering
ConditionState = SPECIAL_CHEERING REALLYDAMAGED
Animation = AIHERO_SKL.AIHERO_ICHA
AnimationMode = ONCE
End
; climbing
ConditionState = CLIMBING
Animation = AIHERO_SKL.AIHERO_CLMID
AnimationMode = LOOP
TransitionKey = TRANS_Climbing
End
AliasConditionState = RAPPELLING
AliasConditionState = CLIMBING REALLYDAMAGED
AliasConditionState = RAPPELLING REALLYDAMAGED
ConditionState = CLIMBING MOVING
Animation = AIHERO_SKL.AIHERO_CLMUP
AnimationMode = LOOP
TransitionKey = TRANS_Climbing
End
AliasConditionState = CLIMBING MOVING REALLYDAMAGED
ConditionState = RAPPELLING MOVING
Animation = AIHERO_SKL.AIHERO_CLMUP
AnimationMode = LOOP_BACKWARDS
TransitionKey = TRANS_Climbing
End
AliasConditionState = RAPPELLING MOVING REALLYDAMAGED
; these transitions don't really work well with our code. leave 'em out.
; TransitionState = TRANS_Climbing TRANS_Stand
; Animation = AIHERO_SKL.AIHERO_CLMST
; AnimationMode = ONCE
; End
;
; TransitionState = TRANS_Stand TRANS_Climbing
; Animation = AIHERO_SKL.AIHERO_CLMST
; AnimationMode = ONCE_BACKWARDS
; End
; dying anims
ConditionState = DYING
Animation = AIHERO_SKL.AIHERO_DTA
Animation = AIHERO_SKL.AIHERO_DTB
Animation = AIHero_SKL.AIHero_IDTA
Animation = AIHero_SKL.AIHero_IDTB
AnimationMode = ONCE
TransitionKey = TRANS_Dying
End
AliasConditionState = RAPPELLING DYING
AliasConditionState = CLIMBING DYING
TransitionState = TRANS_Dying TRANS_Flailing
Animation = AIHERO_SKL.AIHERO_ADTG21
AnimationMode = ONCE
End
ConditionState = DYING EXPLODED_FLAILING
Animation = AIHERO_SKL.AIHERO_ADTG22
AnimationMode = LOOP
TransitionKey = TRANS_Flailing
End
ConditionState = DYING EXPLODED_BOUNCING
Animation = AIHERO_SKL.AIHERO_ADTG23
AnimationMode = ONCE
TransitionKey = None
End
; misc anims
ConditionState = FREEFALL
Animation = AIHERO_SKL.AIHERO_PFL
AnimationMode = LOOP
TransitionKey = TRANS_Falling
End
AliasConditionState = FREEFALL REALLYDAMAGED
AliasConditionState = FREEFALL DYING
ConditionState = PARACHUTING
Animation = AIHERO_SKL.AIHERO_PHG
AnimationMode = LOOP
TransitionKey = TRANS_Chute
End
AliasConditionState = PARACHUTING REALLYDAMAGED
AliasConditionState = PARACHUTING DYING
TransitionState = TRANS_Falling TRANS_Chute
Animation = AIHERO_SKL.AIHERO_POP
AnimationMode = ONCE
Flags = PRISTINE_BONE_POS_IN_FINAL_FRAME ; our bone positions should come from the last frame, rather than the first
End
TransitionState = TRANS_Chute TRANS_Stand
Animation = AIHERO_SKL.AIHERO_PTD
AnimationMode = ONCE
End
TransitionState = TRANS_Chute TRANS_StandInjured
Animation = AIHERO_SKL.AIHERO_PTD
AnimationMode = ONCE
End
End
; ***DESIGN parameters ***
DisplayName = OBJECT:LaserBurton
Side = AmericaLaserGeneral
EditorSorting = INFANTRY
TransportSlotCount = 1 ;how many "slots" we take in a transport (0 == not transportable)
VisionRange = 150
ShroudClearingRange = 500
Prerequisites
Object = Lazr_AmericaBarracks
Object = Lazr_AmericaStrategyCenter
End
BuildCost = 1500
BuildTime = 20.0 ;in seconds
ExperienceValue = 50 100 100 150 ; Experience point value at each level
ExperienceRequired = 0 200 300 600 ; Experience points needed to gain each level
IsTrainable = Yes ; Can gain experience
CrushableLevel = 2 ;What am I?: 0 = for infantry, 1 = for trees, 2 = general vehicles
CommandSet = AmericaInfantryColonelBurtonCommandSet
MaxSimultaneousOfType = 1
WeaponSet
Conditions = None
Weapon = PRIMARY ColonelBurtonLaserWeapon
Weapon = SECONDARY ColonelBurtonKnifeWeapon
AutoChooseSources = PRIMARY FROM_PLAYER FROM_SCRIPT FROM_AI
AutoChooseSources = SECONDARY NONE
End
ArmorSet
Conditions = None
Armor = HumanArmor
DamageFX = InfantryDamageFX
End
ArmorSet
Conditions = PLAYER_UPGRADE
Armor = ChemSuitHumanArmor
DamageFX = InfantryDamageFX
End
; *** AUDIO Parameters ***
VoiceSelect = LaserBurtonVoiceSelect
VoiceMove = ColonelBurtonVoiceMove
VoiceAttack = LaserBurtonVoiceAttack
VoiceFear = ColonelBurtonVoiceFear
VoiceGuard = ColonelBurtonVoiceMove
SoundStealthOn = StealthOn
SoundStealthOff = StealthOff
UnitSpecificSounds
VoiceMelee = ColonelBurtonVoiceAttackKnife
VoiceCreate = LaserBurtonVoiceCreate
VoiceGarrison = ColonelBurtonVoiceGarrison
VoiceEnter = ColonelBurtonVoiceMove
VoiceEnterHostile = ColonelBurtonVoiceMove
VoiceGetHealed = ColonelBurtonVoiceMove
End
; *** ENGINEERING Parameters ***
RadarPriority = UNIT
KindOf = PRELOAD SELECTABLE CAN_ATTACK ATTACK_NEEDS_LINE_OF_SIGHT CAN_CAST_REFLECTIONS INFANTRY SCORE HERO CANNOT_RETALIATE
Body = ActiveBody ModuleTag_02
MaxHealth = 200.0
InitialHealth = 200.0
End
Behavior = AIUpdateInterface ModuleTag_03
AutoAcquireEnemiesWhenIdle = Yes
End
Behavior = CommandButtonHuntUpdate ModuleTag_04 ; allows use of command button hunt script with this unit.
End
Behavior = AutoFindHealingUpdate ModuleTag_05 ; This update will have the unit go to a healing station if injured. jba
ScanRate = 1000 ; once a second.
ScanRange = 300 ;
NeverHeal = 0.85 ; don't heal if we are > 85% healthy.
AlwaysHeal = 0.25 ; if we get below 25%, find healing right away.
End
Locomotor = SET_NORMAL ColonelBurtonGroundLocomotor ColonelBurtonCliffLocomotor
Behavior = PhysicsBehavior ModuleTag_06
Mass = 5.0
End
Behavior = ArmorUpgrade ModuleTag_Armor01
TriggeredBy = Upgrade_AmericaChemicalSuits
End
Behavior = StealthUpdate ModuleTag_07
StealthDelay = 2000 ; msec
StealthForbiddenConditions = FIRING_PRIMARY
HintDetectableConditions = IS_FIRING_WEAPON
FriendlyOpacityMin = 50.0%
FriendlyOpacityMax = 100.0%
InnateStealth = Yes
OrderIdleEnemiesToAttackMeUponReveal = Yes
EnemyDetectionEvaEvent = EnemyColonelBurtonDetected
OwnDetectionEvaEvent = OwnColonelBurtonDetected
End
Behavior = SpecialAbility ModuleTag_08
SpecialPowerTemplate = SpecialAbilityColonelBurtonRemoteCharges
UpdateModuleStartsAttack = Yes
InitiateSound = ColonelBurtonVoicePlantRemoteCharge
End
Behavior = SpecialAbilityUpdate ModuleTag_09
SpecialPowerTemplate = SpecialAbilityColonelBurtonRemoteCharges
StartAbilityRange = 0.0
PreparationTime = 0
SpecialObject = RemoteC4Charge
MaxSpecialObjects = 8
SpecialObjectsPersistWhenOwnerDies = No ;Charges are removed instantly when owner dies (nobody can detonate).
AlwaysValidateSpecialObjects = Yes ;Coupled with the above setting, this one is necessary for code optimization.
SpecialObjectsPersistent = Yes ;Charges are persistent till lifetime expires or owner detonates them.
UniqueSpecialObjectTargets = Yes ;This prevents multiple charges placed on the same object.
UnpackTime = 5500 ;NOTE: Modifying this value will require modifying the delay for ColonelBurtonPlantCharge
PackTime = 0
SkipPackingWithNoTarget = Yes ;When yes, the packing/unpacking will be ignored when detonating charges.
FlipOwnerAfterUnpacking = Yes
FleeRangeAfterCompletion = 100.0 ;Runs away after finishing ability
UnpackSound = ColonelBurtonPlantCharge
LoseStealthOnTrigger = Yes
PreTriggerUnstealthTime = 5000 ; in milliseconds
End
Behavior = SpecialAbility ModuleTag_10
SpecialPowerTemplate = SpecialAbilityColonelBurtonTimedCharges
UpdateModuleStartsAttack = Yes
InitiateSound = ColonelBurtonVoicePlantTimedCharge
End
Behavior = SpecialAbilityUpdate ModuleTag_11
SpecialPowerTemplate = SpecialAbilityColonelBurtonTimedCharges
StartAbilityRange = 0.0
PreparationTime = 0
SpecialObject = TimedC4Charge
MaxSpecialObjects = 10
SpecialObjectsPersistWhenOwnerDies = Yes
SpecialObjectsPersistent = Yes ;Charges are persistent till lifetime expires or owner detonates them.
UniqueSpecialObjectTargets = Yes ;This prevents multiple charges placed on the same object.
UnpackTime = 5500 ;NOTE: Modifying this value will require modifying the delay for ColonelBurtonPlantCharge
FlipOwnerAfterUnpacking = Yes
FleeRangeAfterCompletion = 100.0 ;Runs away after finishing ability
UnpackSound = ColonelBurtonPlantCharge
LoseStealthOnTrigger = Yes
PreTriggerUnstealthTime = 5000 ; in milliseconds
End
Behavior = ExperienceScalarUpgrade ModuleTag_12
TriggeredBy = Upgrade_AmericaAdvancedTraining
AddXPScalar = 1.0 ;Increases experience gained by an additional 100%
End
;Hero units can't be squished!
;Behavior = SquishCollide ModuleTag_13
; ;nothing
;End
; --- begin Death modules ---
Behavior = SlowDeathBehavior ModuleTag_Death01
DeathTypes = ALL -CRUSHED -SPLATTED -EXPLODED -BURNED -POISONED -POISONED_BETA -POISONED_GAMMA
SinkDelay = 3000
SinkRate = 0.5 ; in Dist/Sec
DestructionDelay = 8000
FX = INITIAL FX_ColonelBurtonDie
End
Behavior = SlowDeathBehavior ModuleTag_Death02
DeathTypes = NONE +CRUSHED +SPLATTED
SinkDelay = 3000
SinkRate = 0.5 ; in Dist/Sec
DestructionDelay = 8000
FX = INITIAL FX_GIDieCrushed
End
Behavior = SlowDeathBehavior ModuleTag_Death03
DeathTypes = NONE +EXPLODED
SinkDelay = 3000
SinkRate = 0.5 ; in Dist/Sec
DestructionDelay = 8000
FX = INITIAL FX_ColonelBurtonDie
FlingForce = 8
FlingForceVariance = 3
FlingPitch = 60
FlingPitchVariance = 10
End
Behavior = SlowDeathBehavior ModuleTag_Death04
DeathTypes = NONE +BURNED
DestructionDelay = 0
FX = INITIAL FX_DieByFireUSA
OCL = INITIAL OCL_FlamingInfantry
End
Behavior = SlowDeathBehavior ModuleTag_Death05
DeathTypes = NONE +POISONED
DestructionDelay = 0
FX = INITIAL FX_DieByToxinUSA
OCL = INITIAL OCL_ToxicInfantry
End
Behavior = SlowDeathBehavior ModuleTag_Death06 ; don't forget to give it a new, unique module tag
DeathTypes = NONE +POISONED_BETA
DestructionDelay = 0
FX = INITIAL FX_DieByToxinUSA
OCL = INITIAL OCL_ToxicInfantryBeta ;you'll have to create this OCL and make it use the blue guys instead of green ones
End
Behavior = SlowDeathBehavior ModuleTag_Death07
DeathTypes = NONE +POISONED_GAMMA
DestructionDelay = 0
FX = INITIAL FX_DieByToxinUSA
OCL = INITIAL OCL_ToxicInfantryGamma
End
; --- end Death modules ---
Behavior = PoisonedBehavior ModuleTag_18
PoisonDamageInterval = 100 ; Every this many msec I will retake the poison damage dealt me...
PoisonDuration = 3000 ; ... for this long after last hit by poison damage
End
Geometry = CYLINDER
GeometryMajorRadius = 10.0
GeometryMinorRadius = 10.0
GeometryHeight = 12.0
GeometryIsSmall = Yes
Shadow = SHADOW_DECAL
ShadowSizeX = 14
ShadowSizeY = 14
ShadowTexture = ShadowI
BuildCompletion = APPEARS_AT_RALLY_POINT
End
Code:
AudioEvent LaserBurtonVoiceSelect
Sounds = ibulsea ibulseb ibulsec
Control = random
Volume = 90
Type = ui voice player
End
AudioEvent LaserBurtonVoiceCreate
Sounds = ibulsea
Control = random
Volume = 110
MinVolume = 100
Priority = high
Type = world global player
End
AudioEvent LaserBurtonVoiceAttack
Sounds = ibulsea ibulseb ibulsec
Control = random
Volume = 90
Type = ui voice player
End
Code:
Weapon ColonelBurtonLaserWeapon
PrimaryDamage = 80.0
PrimaryDamageRadius = 5.0
ScatterRadiusVsInfantry = 0.0 ;When this weapon is used against infantry, it can randomly miss by as much as this distance.
AttackRange = 130.0
MinTargetPitch = -15 ; we may not target anything outside of this pitch range
MaxTargetPitch = 15 ; ditto
DamageType = ARMOR_PIERCING
DeathType = NORMAL
WeaponSpeed = 99999 ; dist/sec
WeaponRecoil = 0 ; angle to deflect the model when firing
LaserName = Lazr_CrusaderLaserBeam
LaserBoneName = Muzzle01
FireFX = Lazr_WeaponFX_LaserCrusader
RadiusDamageAffects = ALLIES ENEMIES NEUTRALS
DelayBetweenShots = 1000 ; time between shots, msec
ClipSize = 0 ; how many shots in a Clip (0 == infinite)
ClipReloadTime = 0 ; how long to reload a Clip, msec
ProjectileCollidesWith = STRUCTURES WALLS
End
Code:
CommandButton Lazr_Command_ConstructAmericaInfantryColonelBurton
Command = UNIT_BUILD
Object = Lazr_AmericaInfantryLaserBurton
TextLabel = CONTROLBAR:Lazr_Command_ConstructAmericaInfantryColonelBurton
ButtonImage = SALBur
ButtonBorderType = BUILD ; Identifier for the User as to what kind of button this is
DescriptLabel = CONTROLBAR:ToolTipUSABuildLaserBurton
End
Code:
CommandSet Lazr_AmericaBarracksCommandSet
1 = Lazr_Command_ConstructAmericaInfantryRanger
2 = Lazr_Command_ConstructAmericaInfantryMissileDefender
3 = Lazr_Command_ConstructAmericaInfantryColonelBurton
4 = Lazr_Command_ConstructAmericaInfantryPathfinder
7 = Command_UpgradeAmericaRangerFlashBangGrenade
8 = Command_UpgradeAmericaRangerCaptureBuilding
13 = Command_SetRallyPoint
14 = Command_Sell
End
oldmanfunk