;------------------------------------------------------------------------------
Object GLATankMilitiaTank

  ; *** ART Parameters ***
  SelectPortrait         = SAMilitaTank_L
  ButtonImage            = SAMilitaTank
  
  UpgradeCameo1 = Upgrade_GLAJunkRepair
  UpgradeCameo2 = Upgrade_AmericaAdvancedTraining
  UpgradeCameo3 = Upgrade_ChinaNuclearTanks
  ;UpgradeCameo4 = NONE
  ;UpgradeCameo5 = NONE
  Draw = W3DTankDraw ModuleTag_01
    DefaultConditionState        
      Model               = CVTank
      Turret              = Turret01
      WeaponFireFXBone    = PRIMARY MuzzleFX
      WeaponRecoilBone    = PRIMARY Barrel
      WeaponMuzzleFlash   = PRIMARY MuzzleFX
      WeaponLaunchBone = PRIMARY MuzzleFX
    End
    ConditionState       = REALLYDAMAGED
      Model              = CVTank_D
    End
    ConditionState       = RUBBLE
      Model              = CVTank_D
    End

    TrackMarks           = EXTnkTrack.tga
    OkToChangeModelColor = Yes
  End

  ; ***DESIGN parameters ***
  DisplayName      = OBJECT:MilitiaTank
  Side                   = GLA
  EditorSorting          = VEHICLE
  TransportSlotCount     = 3
  WeaponSet
    Conditions           = None 
    Weapon               = PRIMARY MilitiaTankGun
    Weapon               = SECONDARY LightGenericTankMachineGun
  End
  ArmorSet
    Conditions           = None
    Armor                = TankArmor
    DamageFX             = TankDamageFX
  End
  ArmorSet
    Conditions           = PLAYER_UPGRADE
    Armor                = UpgradedTankArmor
    DamageFX             = TankDamageFX
  End
  BuildCost              = 650
  BuildTime              = 14.0          ;in seconds    
  VisionRange            = 160
  ShroudClearingRange = 300
  Prerequisites
    ;Object = GLAArmsDealer
  End
  ExperienceValue        = 100 100 200 400 ;Experience point value at each level
  ExperienceRequired     = 0 200 300 600 ;Experience points needed to gain each level
  IsTrainable            = Yes  ;Can gain experience
  CrusherLevel           = 2  ;What can I crush?: 1 = infantry, 2 = trees, 3 = vehicles
  CrushableLevel         = 2  ;What am I?:        0 = for infantry, 1 = for trees, 2 = general vehicles
  CommandSet             = GenericCommandSet
  
  ; *** AUDIO Parameters ***
  VoiceSelect = MarauderTankVoiceSelect
  VoiceMove = MarauderTankVoiceMove
  VoiceAttack = MarauderTankVoiceAttack
  SoundMoveStart = BattleMasterTankMoveStart
  SoundMoveStartDamaged = BattleMasterTankMoveStart
  SoundAmbient           = IdleTankLoop
  SoundAmbientRubble     = NoSound
   ;SoundMoveLoop          = MovingTankLoop  ; only when not idle
   ;SoundAmbient           = IdleTankLoop
  UnitSpecificSounds
    ; These have the syntax of SomeNameSomewhereInCode = SomeNameSomewhereInLookupINIs
    VoiceCreate          = QuadCannonVoiceCreate
    TurretMoveStart        = NoSound
    TurretMoveLoop         = OverlordTankTurretMoveLoop
  End

  ; *** ENGINEERING Parameters ***
  RadarPriority          = UNIT
  KindOf                 = PRELOAD SELECTABLE CAN_ATTACK CAN_CAST_REFLECTIONS VEHICLE SCORE
  
  Body                   = ActiveBody ModuleTag_02
    MaxHealth       = 485
    InitialHealth   = 485
  End

  Behavior = AIUpdateInterface ModuleTag_03
    Turret
      TurretTurnRate       = 140 // turn rate, in degrees per sec
      ControlledWeaponSlots= PRIMARY SECONDARY
    End
    AutoAcquireEnemiesWhenIdle = Yes
  End
  Locomotor            = SET_NORMAL MilitiaTankLocomotor
  Locomotor            = SET_NORMAL_UPGRADED NuclearBattleMasterLocomotor
  Behavior = PhysicsBehavior ModuleTag_04
    Mass                 = 50.0
  End

  Behavior = ProductionUpdate ModuleTag_05
    ; nothing
  End

  ; Turret fly off death
  Behavior = SlowDeathBehavior ModuleTag_06
    DeathTypes = ALL -CRUSHED -SPLATTED
    ProbabilityModifier  = 50
    DestructionDelay  = 500
    DestructionDelayVariance  = 100
    FX  = INITIAL  FX_GenericTankDeathEffect
    OCL = MIDPOINT OCL_MilitiaTankDeathEffect
    FX  = FINAL    FX_GenericTankDeathExplosion
  End

  ; Catch fire, and explode death
  Behavior = SlowDeathBehavior ModuleTag_07
    DeathTypes = ALL -CRUSHED -SPLATTED
    ProbabilityModifier  = 50
    DestructionDelay  = 2000
    DestructionDelayVariance  = 300
    FX  = INITIAL  FX_CrusaderCatchFire
    OCL = FINAL    OCL_MilitiaTankDeathEffect  
    FX  = FINAL    FX_GenericTankDeathExplosion 
  End

  Behavior                 = TransitionDamageFX ModuleTag_08
    ReallyDamagedParticleSystem1 = Bone:Smoke RandomBone:Yes PSys:SmallLightSmokeColumn
    ReallyDamagedFXList1 = Loc: X:0 Y:0 Z:0 FXList:FX_CrusaderDamageTransition
  End

  Behavior = DestroyDie ModuleTag_09
    DeathTypes = NONE +CRUSHED +SPLATTED
  End

  ; A crushing defeat
  Behavior = FXListDie ModuleTag_10
    DeathTypes = NONE +CRUSHED +SPLATTED
    DeathFX = FX_CarCrush
  End

  Behavior = CreateObjectDie ModuleTag_11
    DeathTypes = NONE +CRUSHED +SPLATTED
    CreationList = OCL_CrusaderTank_CrushEffect
  End

  Behavior = CreateObjectDie ModuleTag_250
    DeathTypes = ALL -CRUSHED -SPLATTED
    CreationList = OCL_GLATankCrewEjection
    ExemptStatus = HIJACKED
  End

  Behavior                    = CreateCrateDie ModuleTag_CratesChange
   CrateData             = SalvageCrateData
  End

  Behavior = FireWeaponWhenDeadBehavior ModuleTag_12
    DeathWeapon   = NuclearTankDeathWeapon
    StartsActive  = No                        ; turned on by upgrade
    TriggeredBy   = Upgrade_ChinaNuclearTanks
  End
  Behavior = LocomotorSetUpgrade ModuleTag_13
    TriggeredBy = Upgrade_ChinaNuclearTanks
  End

  Behavior = AutoHealBehavior ModuleTag_14
    HealingAmount = 2
    HealingDelay = 1000 ; msec
    TriggeredBy = Upgrade_GLAJunkRepair
  End

  Behavior = ExperienceScalarUpgrade ModuleTag_15
    TriggeredBy = Upgrade_AmericaAdvancedTraining
    AddXPScalar = 1.0 ;Increases experience gained by an additional 100%
  End

  Behavior = FlammableUpdate ModuleTag_16
    AflameDuration = 5000         ; If I catch fire, I'll burn for this long...
    AflameDamageAmount = 5       ; taking this much damage...
    AflameDamageDelay = 500       ; this often.
  End

  Geometry               = BOX
  GeometryMajorRadius    = 15.0
  GeometryMinorRadius    = 10.0
  GeometryHeight         = 10.0     
  GeometryIsSmall        = Yes
  Scale                  = 1.05    
  Shadow = SHADOW_VOLUME
  ShadowSizeX = 45  ; minimum elevation angle above horizon. Used to limit shadow length

End

;------------------------------------------------------------------------------
Object GLAAircraftCropDuster

  ; *** ART Parameters ***
  SelectPortrait         = SAGLACropDuster
  ButtonImage            = SAGLACropDuster
  
  UpgradeCameo1 = Upgrade_GLAAnthraxBeta
  UpgradeCameo2 = Upgrade_GLAJunkRepair
  ;UpgradeCameo3 = NONE
  ;UpgradeCameo4 = NONE
  ;UpgradeCameo5 = NONE

  Draw = W3DModelDraw ModuleTag_01
    ConditionState = NONE
      Model = CVCDTPLN
      Animation           = CVCDTPLN.CVCDTPLN
      AnimationMode       = LOOP
    End
    
    ConditionState = REALLYDAMAGED
      Model = CVCDTPLN_D
    End
    
    ConditionState = RUBBLE
      Model = CVCDTPLN
    End
  End

  ; ***DESIGN parameters ***
  DisplayName     = OBJECT:CropDuster
  Side            = GLA
  EditorSorting   = VEHICLE
 
  TransportSlotCount  = 10                 ;how many "slots" we take in a transport (0 == not transportable)
  
  WeaponSet
    Conditions = None
    Weapon = PRIMARY GenericJetMachineGun
    Weapon = SECONDARY ToxinTruckSprayer
  End

  WeaponSet
    Conditions        = PLAYER_UPGRADE 
    Weapon            = PRIMARY GenericJetMachineGun
    Weapon            = SECONDARY ToxinTruckSprayerUpgraded
  End

  ;WeaponSet
    ;Conditions = CARBOMB
    ;Weapon = PRIMARY  SuicideCarBomb
    ;Weapon = SECONDARY GenericJetMachineGun
  ;End
 
  ArmorSet
    Conditions            = None
    Armor                 = AirplaneArmor
    DamageFX              = None
  End

  BuildCost              = 900
  BuildTime              = 16.0          ;in seconds    
  VisionRange            = 150
  ShroudClearingRange = 300
  Prerequisites
    ;Object =
  End

  ExperienceValue     = 50 50 100 150    ;Experience point value at each level
  ExperienceRequired  = 0 100 150 300  ;Experience points needed to gain each level
  IsTrainable         = Yes             ;Can gain experience
  CrusherLevel           = 1  ;What can I crush?: 1 = infantry, 2 = trees, 3 = vehicles
  CrushableLevel         = 2  ;What am I?:        0 = for infantry, 1 = for trees, 2 = general vehicles
  CommandSet = GLAAircraftCropDusterCommandSet

  ; *** AUDIO Parameters ***
  SoundAmbient = CivPropPlaneAmbientLoop
  VoiceSelect = CombatCycleVoiceSelect
  VoiceMove = CombatCycleVoiceMove
  VoiceAttack = CombatCycleVoiceAttack
  SoundMoveStart = A10ThunderboltDive
  SoundMoveStartDamaged = A10ThunderboltDive
  VoiceGuard = CombatCycleVoiceMove

  UnitSpecificSounds
    ; These have the syntax of SomeNameSomewhereInCode = SomeNameSomewhereInLookupINIs
    VoiceCreate          = CombatCycleVoiceCreate
    VoiceCrush      = CombatCycleVoiceMove
    VoiceEnter = CombatCycleVoiceMove
    StartDive  = A10ThunderboltDive
    VoicePoisonLocation = ToxinTractorVoiceAttackContam
  End

  ; *** ENGINEERING Parameters ***  
  KindOf          = PRELOAD CAN_CAST_REFLECTIONS CAN_ATTACK SELECTABLE VEHICLE SCORE AIRCRAFT
  RadarPriority   = UNIT

  Body            = ActiveBody ModuleTag_02
    MaxHealth       = 155.0
    InitialHealth   = 155.0
  End

  Behavior = DestroyDie ModuleTag_DeathTag03
    ;nothing
  End
  Behavior = CreateObjectDie ModuleTag_DeathTag04
    CreationList = OCL_GenericCarExplode
  End
  Behavior = FXListDie ModuleTag_DeathTag05
    DeathFX = FX_GenericCarExplode
  End

;  Behavior = DestroyDie ModuleTag_03
;    DeathTypes = ALL -CRUSHED -SPLATTED
;  End
;  Behavior = CrushDie ModuleTag_04
;    DeathTypes = NONE +CRUSHED +SPLATTED
;    TotalCrushSound     = CarAlarm
;    BackEndCrushSound   = CarAlarm
;    FrontEndCrushSound  = CarAlarm
;    TotalCrushSoundPercent    = 50   
;    BackEndCrushSoundPercent  = 50
;    FrontEndCrushSoundPercent = 50
;  End
;  Behavior = SlowDeathBehavior ModuleTag_11
;    DeathTypes = NONE +CRUSHED +SPLATTED
;    SinkDelay = 14000
;    SinkRate = 2     ; in Dist/Sec
;    DestructionDelay = 20000
;  End
;
;  Behavior = FXListDie ModuleTag_05
;    DeathTypes = NONE +CRUSHED +SPLATTED
;    DeathFX = FX_CarCrush
;  End
;  Behavior = CreateObjectDie ModuleTag_06
;    DeathTypes = ALL -CRUSHED -SPLATTED
;    CreationList = OCL_GenericCarExplode
;  End
;  Behavior = FXListDie ModuleTag_07
;    DeathTypes = ALL -CRUSHED -SPLATTED -FLOODED
;   DeathFX = FX_GenericCarExplode
;  End
;  Behavior = CreateObjectDie ModuleTag_08
;    DeathTypes = NONE +SUICIDED
;    CreationList = OCL_BurnedCarHull
;  End

  Behavior = JetAIUpdate ModuleTag_09
    OutOfAmmoDamagePerSecond  = 10%  ; amount of damage to take per SEC (not per frame) when out of ammo
                                    ; note that it's expressed as a percent of max health, not an absolute
    TakeoffDistForMaxLift     = 0%   ; larger numbers give more lift sooner when taking off
    TakeoffPause              = 500
    MinHeight                 = 5
    ParkingOffset             = 3             ; scooch it a little forward so the tail doesn't hit the doors
    ReturnToBaseIdleTime      = 10000         ; if idle for this long, return to base, even if not out of ammo
    AutoAcquireEnemiesWhenIdle = YES ATTACK_BUILDINGS
  End
  Locomotor = SET_NORMAL PropPlaneLocomotor
  Locomotor = SET_TAXIING BasicJetTaxiLocomotor

  Behavior = PhysicsBehavior ModuleTag_10
    Mass = 30.0
  End

  Behavior = WeaponSetUpgrade ModuleTag_11
    ; the plane gets this upgrade if we either buy the upgrade,
    ; or if it gets HEROIC status
    TriggeredBy   = Upgrade_GLAAnthraxBeta Upgrade_Veterancy_HEROIC
  End
  
  Behavior                          = TransitionDamageFX ModuleTag_12
    ReallyDamagedParticleSystem1  = Bone:Smoke RandomBone:Yes PSys:SmallLightSmokeColumn
    ReallyDamagedFXList1          = Loc: X:0 Y:0 Z:0 FXList:FX_BattleMasterDamageTransition
  End
  
  Behavior = AutoHealBehavior ModuleTag_13
    HealingAmount   = 2
    HealingDelay    = 1000 ; msec
    TriggeredBy     = Upgrade_GLAJunkRepair
  End

  Behavior = FireOCLAfterWeaponCooldownUpdate ModuleTag_14
    WeaponSlot            = SECONDARY
    ConflictsWith         = Upgrade_GLAAnthraxBeta Upgrade_Veterancy_HEROIC
    OCL                   = OCL_PoisonFieldMedium
    MinShotsToCreateOCL   = 4
    OCLLifetimePerSecond  = 10000
    OCLLifetimeMaxCap     = 180000
  End
  Behavior = FireOCLAfterWeaponCooldownUpdate ModuleTag_15
    WeaponSlot            = SECONDARY
    TriggeredBy           = Upgrade_GLAAnthraxBeta Upgrade_Veterancy_HEROIC
    OCL                   = OCL_PoisonFieldUpgradedMedium
    MinShotsToCreateOCL   = 4
    OCLLifetimePerSecond  = 10000
    OCLLifetimeMaxCap     = 180000
  End

  Behavior = FireWeaponWhenDeadBehavior ModuleTag_16    ;These two make the right damage field at death
    DeathWeapon   = ToxinShellWeapon
    StartsActive  = Yes   
    ConflictsWith = Upgrade_GLAAnthraxBeta
  End
  Behavior = FireWeaponWhenDeadBehavior ModuleTag_17
    DeathWeapon   = ToxinShellWeaponUpgraded
    StartsActive  = No   
    TriggeredBy = Upgrade_GLAAnthraxBeta
  End

  Behavior = FlammableUpdate ModuleTag_18
    AflameDuration = 5000         ; If I catch fire, I'll burn for this long...
    AflameDamageAmount = 5       ; taking this much damage...
    AflameDamageDelay = 500       ; this often.
  End

  Geometry        = BOX
  GeometryIsSmall = Yes
  GeometryMajorRadius = 16.0
  GeometryMinorRadius = 4.0
  GeometryHeight  = 7.0
  Scale = 0.90
  Shadow          = SHADOW_VOLUME

End

;------------------------------------------------------------------------------
Object GLAAircraftCessna

  ; *** ART Parameters ***
  SelectPortrait         = SAGLACessna
  ButtonImage            = SAGLACessna
  
  ;UpgradeCameo1 = Upgrade_GLAAnthraxBeta
  UpgradeCameo2 = Upgrade_GLAJunkRepair
  ;UpgradeCameo3 = NONE
  ;UpgradeCameo4 = NONE
  ;UpgradeCameo5 = NONE

  Draw = W3DModelDraw ModuleTag_01
    ConditionState = NONE
      Model = CVCESSNA
    End
    
    ConditionState = REALLYDAMAGED
      Model = CVCESSNA_D
    End
    
    ConditionState = RUBBLE
      Model = CVCESSNA_D
    End
  End

  ; ***DESIGN parameters ***
  DisplayName     = OBJECT:Cessna
  Side            = GLA
  EditorSorting   = VEHICLE
 
  TransportSlotCount  = 10                 ;how many "slots" we take in a transport (0 == not transportable)
  
  WeaponSet
    Conditions = None
    Weapon = PRIMARY GenericJetMachineGun
    ;Weapon = SECONDARY ToxinTruckSprayer
  End

  WeaponSet
    Conditions        = PLAYER_UPGRADE 
    Weapon            = PRIMARY GenericJetMachineGun
    ;Weapon            = SECONDARY ToxinTruckSprayerUpgraded
  End

  ;WeaponSet
    ;Conditions = CARBOMB
    ;Weapon = PRIMARY  SuicideCarBomb
    ;Weapon = SECONDARY GenericJetMachineGun
  ;End
 
  ArmorSet
    Conditions            = None
    Armor                 = AirplaneArmor
    DamageFX              = None
  End

  BuildCost              = 800
  BuildTime              = 13.0          ;in seconds    
  VisionRange            = 150
  ShroudClearingRange = 300
  Prerequisites
    ;Object =
  End
  ExperienceValue     = 50 50 100 150    ;Experience point value at each level
  ExperienceRequired  = 0 100 150 300  ;Experience points needed to gain each level
  IsTrainable         = Yes             ;Can gain experience
  CrusherLevel           = 1  ;What can I crush?: 1 = infantry, 2 = trees, 3 = vehicles
  CrushableLevel         = 2  ;What am I?:        0 = for infantry, 1 = for trees, 2 = general vehicles
  CommandSet = GLAAircraftCessnaCommandSet

  ; *** AUDIO Parameters ***
  SoundAmbient = CivPropPlaneAmbientLoop
  VoiceSelect = CombatCycleVoiceSelect
  VoiceMove = CombatCycleVoiceMove
  VoiceAttack = CombatCycleVoiceAttack
  SoundMoveStart = A10ThunderboltDive
  SoundMoveStartDamaged = A10ThunderboltDive
  VoiceGuard = CombatCycleVoiceMove

  UnitSpecificSounds
    ; These have the syntax of SomeNameSomewhereInCode = SomeNameSomewhereInLookupINIs
    VoiceCreate          = CombatCycleVoiceCreate
    VoiceCrush      = CombatCycleVoiceMove
    StartDive  = A10ThunderboltDive
    VoiceEnter = CombatCycleVoiceMove
  End

  ; *** ENGINEERING Parameters ***  
  KindOf          = PRELOAD CAN_CAST_REFLECTIONS CAN_ATTACK SELECTABLE VEHICLE SCORE AIRCRAFT
  RadarPriority   = UNIT

  Body            = ActiveBody ModuleTag_02
    MaxHealth       = 150.0
    InitialHealth   = 150.0
  End

  Behavior = DestroyDie ModuleTag_03
    DeathTypes = ALL -CRUSHED -SPLATTED
  End
  Behavior = CrushDie ModuleTag_04
    DeathTypes = NONE +CRUSHED +SPLATTED
    ;TotalCrushSound     = CarAlarm
    ;BackEndCrushSound   = CarAlarm
    ;FrontEndCrushSound  = CarAlarm
    TotalCrushSoundPercent    = 50   
    BackEndCrushSoundPercent  = 50
    FrontEndCrushSoundPercent = 50
  End
  Behavior = SlowDeathBehavior ModuleTag_11
    DeathTypes = NONE +CRUSHED +SPLATTED
    SinkDelay = 14000
    SinkRate = 2     ; in Dist/Sec
    DestructionDelay = 20000
  End

  Behavior = FXListDie ModuleTag_05
    DeathTypes = NONE +CRUSHED +SPLATTED
    DeathFX = FX_CarCrush
  End
  Behavior = CreateObjectDie ModuleTag_06
    DeathTypes = ALL -CRUSHED -SPLATTED
    CreationList = OCL_GenericCarExplode
  End
  Behavior = FXListDie ModuleTag_07
    DeathTypes = ALL -CRUSHED -SPLATTED -FLOODED
    DeathFX = FX_GenericCarExplode
  End
  Behavior = CreateObjectDie ModuleTag_08
    DeathTypes = NONE +SUICIDED
    CreationList = OCL_BurnedCarHull
  End

  Behavior = JetAIUpdate ModuleTag_09
    OutOfAmmoDamagePerSecond  = 10%  ; amount of damage to take per SEC (not per frame) when out of ammo
                                    ; note that it's expressed as a percent of max health, not an absolute
    TakeoffDistForMaxLift     = 0%   ; larger numbers give more lift sooner when taking off
    TakeoffPause              = 500
    MinHeight                 = 5
    ParkingOffset             = 3             ; scooch it a little forward so the tail doesn't hit the doors
    ReturnToBaseIdleTime      = 10000         ; if idle for this long, return to base, even if not out of ammo
    AutoAcquireEnemiesWhenIdle = YES ATTACK_BUILDINGS
  End
  Locomotor = SET_NORMAL PropPlaneLocomotor
  Locomotor = SET_TAXIING BasicJetTaxiLocomotor

  Behavior = PhysicsBehavior ModuleTag_10
    Mass = 30.0
  End

  ;Behavior = WeaponSetUpgrade ModuleTag_11
    ; the plane gets this upgrade if we either buy the upgrade,
    ; or if it gets HEROIC status
    ;TriggeredBy   = Upgrade_GLAAnthraxBeta Upgrade_Veterancy_HEROIC
  ;End
  
  Behavior                          = TransitionDamageFX ModuleTag_12
    ReallyDamagedParticleSystem1  = Bone:Smoke RandomBone:Yes PSys:SmallLightSmokeColumn
    ReallyDamagedFXList1          = Loc: X:0 Y:0 Z:0 FXList:FX_BattleMasterDamageTransition
  End
  
  Behavior = AutoHealBehavior ModuleTag_13
    HealingAmount   = 2
    HealingDelay    = 1000 ; msec
    TriggeredBy     = Upgrade_GLAJunkRepair
  End

  Behavior = FlammableUpdate ModuleTag_14
    AflameDuration = 5000         ; If I catch fire, I'll burn for this long...
    AflameDamageAmount = 5       ; taking this much damage...
    AflameDamageDelay = 500       ; this often.
  End

  Geometry        = BOX
  GeometryIsSmall = No
  GeometryMajorRadius = 20.0
  GeometryMinorRadius = 4.0
  GeometryHeight  = 7.0
  Scale = 0.90
  Shadow          = SHADOW_VOLUME

End

;------------------------------------------------------------------------------
Object GLAVehicleBackhoe

  ; *** ART Parameters ***
  SelectPortrait         = SAGLABackhoe_L
  ButtonImage            = SAGLABackhoe

  UpgradeCameo1 = Upgrade_GLAJunkRepair
  ;UpgradeCameo2 = NONE
  ;UpgradeCameo3 = NONE
  ;UpgradeCameo4 = NONE
  ;UpgradeCameo5 = NONE

  ;Draw = W3DModelDraw ModuleTag_01
  Draw = W3DTruckDraw ModuleTag_TruckDraw
    ConditionState = NONE
      Model = CVBACKHOE
      ParticleSysBone   = EXHAUSTFX01 DozerSmokeLight
      WaitForStateToFinishIfPossible = TRANS_DIGGING
    End

    ConditionState = PREATTACK_A
      Model             = CVBACKHOE 
      Animation         = NVCONSTDOZ_A.NVCONSTDOZ_A
      AnimationMode     = ONCE
      ParticleSysBone   = EXHAUSTFX01 DozerSmokeHeavy
      ParticleSysBone   = DIRTFX01 DozerDirtFall ;gush of dirt
      TransitionKey     = TRANS_DIGGING
    End

    ConditionState = MOVING
      Model             = CVBACKHOE
      ParticleSysBone   = EXHAUSTFX01 DozerSmokeHeavy
      WaitForStateToFinishIfPossible = TRANS_DIGGING
    End
    
    ConditionState = REALLYDAMAGED
      Model = CVBACKHOE
      ParticleSysBone   = EXHAUSTFX01 DozerSmokeHeavy
      WaitForStateToFinishIfPossible = TRANS_DIGGING_DAMAGED
    End

    ConditionState = PREATTACK_A REALLYDAMAGED RUBBLE
      Model             = CVBACKHOE
      Animation         = NVCONSTDOZ_AD.NVCONSTDOZ_AD
      AnimationMode     = ONCE
      ParticleSysBone   = EXHAUSTFX01 DozerSmokeHeavy
      ParticleSysBone   = DIRTFX01 DozerDirtFall ;gush of dirt
      TransitionKey     = TRANS_DIGGING_DAMAGED
    End

    ConditionState      = MOVING REALLYDAMAGED RUBBLE
      Model             = CVBACKHOE
      ParticleSysBone   = EXHAUSTFX01 DozerSmokeHeavy
      WaitForStateToFinishIfPossible = TRANS_DIGGING_DAMAGED
    End
    
    ConditionState = RUBBLE
      Model = CVBACKHOE_D
    End
    
    TrackMarks            = EXTireTrack2.tga
    Dust                  = RocketBuggyDust
    DirtSpray             = RocketBuggyDirtSpray

    ; These parameters are only used if the model has a separate suspension, 
    ; and the locomotor has HasSuspension = Yes.

    LeftFrontTireBone = Tire01
    RightFrontTireBone = Tire04
    LeftRearTireBone = Tire03
    RightRearTireBone = Tire02

    TireRotationMultiplier      = 0.2   ; this * speed = rotation.
    PowerslideRotationAddition  = 0   ; This vehicle doesn't powerslide.

  ParticlesAttachedToAnimatedBones = Yes 


  End


  ; ***DESIGN parameters ***
  DisplayName      = OBJECT:Backhoe
  Side             = GLA
  EditorSorting    = VEHICLE
 
  TransportSlotCount  = 4                 ;how many "slots" we take in a transport (0 == not transportable)
  
  WeaponSet
    Conditions = None
    Weapon = PRIMARY None
  End

  WeaponSet
    Conditions = MINE_CLEARING_DETAIL 
    Weapon = PRIMARY DozerMineDisarmingWeapon
  End
 
  ArmorSet
    Conditions        = None
    Armor             = DozerArmor ;Special Explosion-Proof Armor
    DamageFX          = TankDamageFX
  End

  BuildCost              = 900
  BuildTime              = 5.0          ;in seconds    
  VisionRange            = 150
  ShroudClearingRange = 300
  Prerequisites
    ;Object = GLACommandCenter
  End

  CrusherLevel           = 2  ;What can I crush?: 1 = infantry, 2 = trees, 3 = vehicles
  CrushableLevel         = 2  ;What am I?:        0 = for infantry, 1 = for trees, 2 = general vehicles
  CommandSet = GLAWorkerCommandSet

  ; *** AUDIO Parameters ***
  VoiceSelect = WorkerVoiceSelect
  VoiceMove = WorkerVoiceMove
  VoiceGuard = WorkerVoiceMove
  VoiceAttack = WorkerVoiceMove
  VoiceTaskComplete = WorkerVoiceBuildComplete
  SoundMoveStart = CarMoveStart
  SoundMoveStartDamaged = CarMoveStart
  SoundEnter = HumveeEnter
  SoundExit = HumveeExit

  UnitSpecificSounds
  ; These have the syntax of SomeNameSomewhereInCode = SomeNameSomewhereInLookupINIs
    VoiceCreate = WorkerVoiceCreate
    VoiceNoBuild = WorkerVoiceBuildNot
    TruckLandingSound = RocketBuggyLand
    TruckPowerslideSound = RocketBuggyPowerslide
    VoiceRepair = WorkerVoiceRepair
    VoiceDisarm = WorkerVoiceClearMine
    VoiceEnter = WorkerVoiceMoveUpgraded
    VoiceEnterHostile = WorkerVoiceMoveUpgraded
    VoiceGarrison = WorkerVoiceGarrison
    VoiceBuildResponse = WorkerVoiceBuild
    ;VoiceNoBuild = DozerUSAVoiceBuildNot
  End

  ; *** ENGINEERING Parameters ***  
  KindOf          = PRELOAD VEHICLE SCORE SELECTABLE CAN_CAST_REFLECTIONS DOZER
  RadarPriority   = UNIT

  Body            = ActiveBody ModuleTag_02
    MaxHealth       = 225.0
    InitialHealth   = 225.0

    ; Subdual damage "Subdues" you (reaction defined by BodyModule) when it passes your max health.
    ; The cap limits how extra-subdued you can be, and the other numbers detemine how fast it drains away on its own.
    SubdualDamageCap = 500
    SubdualDamageHealRate = 500
    SubdualDamageHealAmount = 50
  End

  Behavior            = PhysicsBehavior ModuleTag_03
    Mass              = 75.0
  End

  Behavior = StealthDetectorUpdate ModuleTag_04
    DetectionRate         = 500   ; how often to rescan for stealthed things in my sight (msec)
    ;DetectionRange       = ??? ;Dustin, enable this for independant balancing!
    CanDetectWhileGarrisoned  = No ;Garrisoned means being in a structure that you units can shoot out of.
    CanDetectWhileContained   = No ;Contained means being in a transport or tunnel network.
    ExtraRequiredKindOf   = MINE  ; we can only detect MINES, not other stealthed things
  End

  Behavior                 = TransitionDamageFX ModuleTag_05
    ReallyDamagedParticleSystem1 = Bone:Smoke RandomBone:Yes PSys:SmokeSmallContinuous01
    ReallyDamagedFXList1 = Loc: X:0 Y:0 Z:0 FXList:FX_BattleMasterDamageTransition
  End

  Behavior = DestroyDie ModuleTag_DeathTag06
    ;nothing
  End
  Behavior = CreateObjectDie ModuleTag_DeathTag07
    CreationList = OCL_GenericCarExplode
  End
  Behavior = FXListDie ModuleTag_DeathTag08
    DeathFX = FX_GenericCarExplode
  End

  ; Catch fire, and explode death
  Behavior = SlowDeathBehavior ModuleTag_09
    DeathTypes = ALL -CRUSHED -SPLATTED
    ProbabilityModifier = 100
    DestructionDelay = 1500
    DestructionDelayVariance = 600
    FX   = INITIAL  FX_CrusaderCatchFire
    FX   = MIDPOINT FX_ToxinTractorDie
    OCL  = FINAL OCL_ToxinTractorDeathEffect
  End

  Behavior = DozerAIUpdate ModuleTag_10
    RepairHealthPercentPerSecond = 2%    ; % of max health to repair each second
    BoredTime                    = 5000  ; in milliseconds
    BoredRange                   = 150   ; when bored, we look this far away to do something
    ; the only "enemies" that workers can acquire are mines, to be disarmed...
    AutoAcquireEnemiesWhenIdle   = Yes
  End

  Locomotor = SET_NORMAL AmericaVehicleDozerLocomotor

  Behavior = FlammableUpdate ModuleTag_11
    AflameDuration = 5000         ; If I catch fire, I'll burn for this long...
    AflameDamageAmount = 5       ; taking this much damage...
    AflameDamageDelay = 500       ; this often.
  End

  Behavior = CreateCrateDie ModuleTag_CratesChange
    CrateData = SalvageCrateData
  End
  
  Behavior = FlammableUpdate ModuleTag_12
    AflameDuration = 5000         ; If I catch fire, I'll burn for this long...
    AflameDamageAmount = 3       ; taking this much damage...
    AflameDamageDelay = 500       ; this often.
  End

  Behavior = CommandSetUpgrade ModuleTag_13
    TriggeredBy = Upgrade_GLAWorkerFakeCommandSet
    RemovesUpgrades = Upgrade_GLAWorkerRealCommandSet
    CommandSet = GLAWorkerFakeBuildingsCommandSet
  End
 
  Behavior = CommandSetUpgrade ModuleTag_14
    TriggeredBy = Upgrade_GLAWorkerRealCommandSet
    RemovesUpgrades = Upgrade_GLAWorkerFakeCommandSet Upgrade_GLAWorkerRealCommandSet
    CommandSet = GLAWorkerCommandSet
  End
 
  Behavior = ProductionUpdate ModuleTag_15
    MaxQueueEntries = 1; For the command set switching upgrade
  End

;;;;;;;;  ClientUpdate         = AnimatedParticleSysBoneClientUpdate ModuleTag_16
;;;;;;;;  End

  Behavior                    = SlowDeathBehavior  ModuleTag_17
    DeathTypes                = ALL -CRUSHED -SPLATTED
    ProbabilityModifier       = 5
    ModifierBonusPerOverkillPercent = 20%  ; negative means less likely to pick this in the face of much damage, positive means more likely
    DestructionDelay          = 0
    DestructionDelayVariance  = 200
    FX                        = INITIAL FX_ToxinTractorDie
    OCL                       = INITIAL OCL_ToxinTractorDeathEffect
    FX                        = FINAL FX_ToxinTruckExplosionOneFinal
  End
  Behavior                    = InstantDeathBehavior  ModuleTag_18
    DeathTypes                = NONE +CRUSHED +SPLATTED
    FX                        = FX_CarCrush
    OCL                       = OCL_CrusaderTank_CrushEffect
  End

  Behavior = AutoHealBehavior ModuleTag_19
    HealingAmount = 2
    HealingDelay = 1000 ; msec
    TriggeredBy = Upgrade_GLAJunkRepair
  End

  Geometry        = BOX
  GeometryIsSmall = Yes
  GeometryMajorRadius = 15.0
  GeometryMinorRadius = 8.0
  GeometryHeight  = 12.0
  Scale = 1.0
  Shadow          = SHADOW_VOLUME

End

;------------------------------------------------------------------------------
Object Slth_GLAVehicleBackhoe

  ; *** ART Parameters ***
  SelectPortrait         = SAGLABackhoe_L
  ButtonImage            = SAGLABackhoe

  UpgradeCameo1 = Upgrade_GLAJunkRepair
  ;UpgradeCameo2 = NONE
  ;UpgradeCameo3 = NONE
  ;UpgradeCameo4 = NONE
  ;UpgradeCameo5 = NONE

  ;Draw = W3DModelDraw ModuleTag_01
  Draw = W3DTruckDraw ModuleTag_TruckDraw
    ConditionState = NONE
      Model = CVBACKHOE
      ParticleSysBone   = EXHAUSTFX01 DozerSmokeLight
      WaitForStateToFinishIfPossible = TRANS_DIGGING
    End

    ConditionState = PREATTACK_A
      Model             = CVBACKHOE 
      Animation         = NVCONSTDOZ_A.NVCONSTDOZ_A
      AnimationMode     = ONCE
      ParticleSysBone   = EXHAUSTFX01 DozerSmokeHeavy
      ParticleSysBone   = DIRTFX01 DozerDirtFall ;gush of dirt
      TransitionKey     = TRANS_DIGGING
    End

    ConditionState = MOVING
      Model             = CVBACKHOE
      ParticleSysBone   = EXHAUSTFX01 DozerSmokeHeavy
      WaitForStateToFinishIfPossible = TRANS_DIGGING
    End
    
    ConditionState = REALLYDAMAGED
      Model = CVBACKHOE
      ParticleSysBone   = EXHAUSTFX01 DozerSmokeHeavy
      WaitForStateToFinishIfPossible = TRANS_DIGGING_DAMAGED
    End

    ConditionState = PREATTACK_A REALLYDAMAGED RUBBLE
      Model             = CVBACKHOE
      Animation         = NVCONSTDOZ_AD.NVCONSTDOZ_AD
      AnimationMode     = ONCE
      ParticleSysBone   = EXHAUSTFX01 DozerSmokeHeavy
      ParticleSysBone   = DIRTFX01 DozerDirtFall ;gush of dirt
      TransitionKey     = TRANS_DIGGING_DAMAGED
    End

    ConditionState      = MOVING REALLYDAMAGED RUBBLE
      Model             = CVBACKHOE
      ParticleSysBone   = EXHAUSTFX01 DozerSmokeHeavy
      WaitForStateToFinishIfPossible = TRANS_DIGGING_DAMAGED
    End
    
    ConditionState = RUBBLE
      Model = CVBACKHOE_D
    End
    
    TrackMarks            = EXTireTrack2.tga
    Dust                  = RocketBuggyDust
    DirtSpray             = RocketBuggyDirtSpray

    ; These parameters are only used if the model has a separate suspension, 
    ; and the locomotor has HasSuspension = Yes.

    LeftFrontTireBone = Tire01
    RightFrontTireBone = Tire04
    LeftRearTireBone = Tire03
    RightRearTireBone = Tire02

    TireRotationMultiplier      = 0.2   ; this * speed = rotation.
    PowerslideRotationAddition  = 0   ; This vehicle doesn't powerslide.

  ParticlesAttachedToAnimatedBones = Yes 


  End


  ; ***DESIGN parameters ***
  DisplayName      = OBJECT:Backhoe
  Side             = GLAStealthGeneral
  EditorSorting    = VEHICLE
 
  TransportSlotCount  = 4                 ;how many "slots" we take in a transport (0 == not transportable)
  
  WeaponSet
    Conditions = None
    Weapon = PRIMARY None
  End

  WeaponSet
    Conditions = MINE_CLEARING_DETAIL 
    Weapon = PRIMARY DozerMineDisarmingWeapon
  End
 
  ArmorSet
    Conditions        = None
    Armor             = DozerArmor ;Special Explosion-Proof Armor
    DamageFX          = TankDamageFX
  End

  BuildCost              = 900
  BuildTime              = 5.0          ;in seconds    
  VisionRange            = 150
  ShroudClearingRange = 300
  Prerequisites
    ;Object = GLACommandCenter
  End

  CrusherLevel           = 2  ;What can I crush?: 1 = infantry, 2 = trees, 3 = vehicles
  CrushableLevel         = 2  ;What am I?:        0 = for infantry, 1 = for trees, 2 = general vehicles
  CommandSet = Slth_GLAWorkerCommandSet

  ; *** AUDIO Parameters ***
  VoiceSelect = WorkerVoiceSelect
  VoiceMove = WorkerVoiceMove
  VoiceGuard = WorkerVoiceMove
  VoiceAttack = WorkerVoiceMove
  VoiceTaskComplete = WorkerVoiceBuildComplete
  SoundMoveStart = CarMoveStart
  SoundMoveStartDamaged = CarMoveStart
  SoundEnter = HumveeEnter
  SoundExit = HumveeExit

  UnitSpecificSounds
  ; These have the syntax of SomeNameSomewhereInCode = SomeNameSomewhereInLookupINIs
    VoiceCreate = WorkerVoiceCreate
    VoiceNoBuild = WorkerVoiceBuildNot
    TruckLandingSound = RocketBuggyLand
    TruckPowerslideSound = RocketBuggyPowerslide
    VoiceRepair = WorkerVoiceRepair
    VoiceDisarm = WorkerVoiceClearMine
    VoiceEnter = WorkerVoiceMoveUpgraded
    VoiceEnterHostile = WorkerVoiceMoveUpgraded
    VoiceGarrison = WorkerVoiceGarrison
    VoiceBuildResponse = WorkerVoiceBuild
    ;VoiceNoBuild = DozerUSAVoiceBuildNot
  End

  ; *** ENGINEERING Parameters ***  
  KindOf          = PRELOAD VEHICLE SCORE SELECTABLE CAN_CAST_REFLECTIONS DOZER
  RadarPriority   = UNIT

  Body            = ActiveBody ModuleTag_02
    MaxHealth       = 225.0
    InitialHealth   = 225.0

    ; Subdual damage "Subdues" you (reaction defined by BodyModule) when it passes your max health.
    ; The cap limits how extra-subdued you can be, and the other numbers detemine how fast it drains away on its own.
    SubdualDamageCap = 500
    SubdualDamageHealRate = 500
    SubdualDamageHealAmount = 50
  End

  Behavior            = PhysicsBehavior ModuleTag_03
    Mass              = 75.0
  End

  Behavior = StealthDetectorUpdate ModuleTag_04
    DetectionRate         = 500   ; how often to rescan for stealthed things in my sight (msec)
    ;DetectionRange       = ??? ;Dustin, enable this for independant balancing!
    CanDetectWhileGarrisoned  = No ;Garrisoned means being in a structure that you units can shoot out of.
    CanDetectWhileContained   = No ;Contained means being in a transport or tunnel network.
    ExtraRequiredKindOf   = MINE  ; we can only detect MINES, not other stealthed things
  End

  Behavior                 = TransitionDamageFX ModuleTag_05
    ReallyDamagedParticleSystem1 = Bone:Smoke RandomBone:Yes PSys:SmokeSmallContinuous01
    ReallyDamagedFXList1 = Loc: X:0 Y:0 Z:0 FXList:FX_BattleMasterDamageTransition
  End

  Behavior = DestroyDie ModuleTag_DeathTag06
    ;nothing
  End
  Behavior = CreateObjectDie ModuleTag_DeathTag07
    CreationList = OCL_GenericCarExplode
  End
  Behavior = FXListDie ModuleTag_DeathTag08
    DeathFX = FX_GenericCarExplode
  End

  ; Catch fire, and explode death
  Behavior = SlowDeathBehavior ModuleTag_09
    DeathTypes = ALL -CRUSHED -SPLATTED
    ProbabilityModifier = 100
    DestructionDelay = 1500
    DestructionDelayVariance = 600
    FX   = INITIAL  FX_CrusaderCatchFire
    FX   = MIDPOINT FX_ToxinTractorDie
    OCL  = FINAL OCL_ToxinTractorDeathEffect
  End

  Behavior = DozerAIUpdate ModuleTag_10
    RepairHealthPercentPerSecond = 2%    ; % of max health to repair each second
    BoredTime                    = 5000  ; in milliseconds
    BoredRange                   = 150   ; when bored, we look this far away to do something
    ; the only "enemies" that workers can acquire are mines, to be disarmed...
    AutoAcquireEnemiesWhenIdle   = Yes
  End

  Locomotor = SET_NORMAL AmericaVehicleDozerLocomotor

  Behavior = FlammableUpdate ModuleTag_11
    AflameDuration = 5000         ; If I catch fire, I'll burn for this long...
    AflameDamageAmount = 5       ; taking this much damage...
    AflameDamageDelay = 500       ; this often.
  End

  Behavior = CreateCrateDie ModuleTag_CratesChange
    CrateData = SalvageCrateData
  End
  
  Behavior = FlammableUpdate ModuleTag_12
    AflameDuration = 5000         ; If I catch fire, I'll burn for this long...
    AflameDamageAmount = 3       ; taking this much damage...
    AflameDamageDelay = 500       ; this often.
  End

  Behavior = CommandSetUpgrade ModuleTag_13
    TriggeredBy = Upgrade_GLAWorkerFakeCommandSet
    RemovesUpgrades = Upgrade_GLAWorkerRealCommandSet
    CommandSet = Slth_GLAWorkerFakeBuildingsCommandSet
  End
 
  Behavior = CommandSetUpgrade ModuleTag_14
    TriggeredBy = Upgrade_GLAWorkerRealCommandSet
    RemovesUpgrades = Upgrade_GLAWorkerFakeCommandSet Upgrade_GLAWorkerRealCommandSet
    CommandSet = Slth_GLAWorkerCommandSet
  End
 
  Behavior = ProductionUpdate ModuleTag_15
    MaxQueueEntries = 1; For the command set switching upgrade
  End

;;;;;;;;  ClientUpdate         = AnimatedParticleSysBoneClientUpdate ModuleTag_16
;;;;;;;;  End

  Behavior                    = SlowDeathBehavior  ModuleTag_17
    DeathTypes                = ALL -CRUSHED -SPLATTED
    ProbabilityModifier       = 5
    ModifierBonusPerOverkillPercent = 20%  ; negative means less likely to pick this in the face of much damage, positive means more likely
    DestructionDelay          = 0
    DestructionDelayVariance  = 200
    FX                        = INITIAL FX_ToxinTractorDie
    OCL                       = INITIAL OCL_ToxinTractorDeathEffect
    FX                        = FINAL FX_ToxinTruckExplosionOneFinal
  End
  Behavior                    = InstantDeathBehavior  ModuleTag_18
    DeathTypes                = NONE +CRUSHED +SPLATTED
    FX                        = FX_CarCrush
    OCL                       = OCL_CrusaderTank_CrushEffect
  End

  Behavior = AutoHealBehavior ModuleTag_19
    HealingAmount = 2
    HealingDelay = 1000 ; msec
    TriggeredBy = Upgrade_GLAJunkRepair
  End

  Geometry        = BOX
  GeometryIsSmall = Yes
  GeometryMajorRadius = 15.0
  GeometryMinorRadius = 8.0
  GeometryHeight  = 12.0
  Scale = 1.0
  Shadow          = SHADOW_VOLUME

End

;------------------------------------------------------------------------------
Object Demo_GLAVehicleBackhoe

  ; *** ART Parameters ***
  SelectPortrait         = SAGLABackhoe_L
  ButtonImage            = SAGLABackhoe

  UpgradeCameo1 = Upgrade_GLAJunkRepair
  ;UpgradeCameo2 = NONE
  ;UpgradeCameo3 = NONE
  ;UpgradeCameo4 = NONE
  ;UpgradeCameo5 = NONE

  ;Draw = W3DModelDraw ModuleTag_01
  Draw = W3DTruckDraw ModuleTag_TruckDraw
    ConditionState = NONE
      Model = CVBACKHOE
      ParticleSysBone   = EXHAUSTFX01 DozerSmokeLight
      WaitForStateToFinishIfPossible = TRANS_DIGGING
    End

    ConditionState = PREATTACK_A
      Model             = CVBACKHOE 
      Animation         = NVCONSTDOZ_A.NVCONSTDOZ_A
      AnimationMode     = ONCE
      ParticleSysBone   = EXHAUSTFX01 DozerSmokeHeavy
      ParticleSysBone   = DIRTFX01 DozerDirtFall ;gush of dirt
      TransitionKey     = TRANS_DIGGING
    End

    ConditionState = MOVING
      Model             = CVBACKHOE
      ParticleSysBone   = EXHAUSTFX01 DozerSmokeHeavy
      WaitForStateToFinishIfPossible = TRANS_DIGGING
    End
    
    ConditionState = REALLYDAMAGED
      Model = CVBACKHOE
      ParticleSysBone   = EXHAUSTFX01 DozerSmokeHeavy
      WaitForStateToFinishIfPossible = TRANS_DIGGING_DAMAGED
    End

    ConditionState = PREATTACK_A REALLYDAMAGED RUBBLE
      Model             = CVBACKHOE
      Animation         = NVCONSTDOZ_AD.NVCONSTDOZ_AD
      AnimationMode     = ONCE
      ParticleSysBone   = EXHAUSTFX01 DozerSmokeHeavy
      ParticleSysBone   = DIRTFX01 DozerDirtFall ;gush of dirt
      TransitionKey     = TRANS_DIGGING_DAMAGED
    End

    ConditionState      = MOVING REALLYDAMAGED RUBBLE
      Model             = CVBACKHOE
      ParticleSysBone   = EXHAUSTFX01 DozerSmokeHeavy
      WaitForStateToFinishIfPossible = TRANS_DIGGING_DAMAGED
    End
    
    ConditionState = RUBBLE
      Model = CVBACKHOE_D
    End
    
    TrackMarks            = EXTireTrack2.tga
    Dust                  = RocketBuggyDust
    DirtSpray             = RocketBuggyDirtSpray

    ; These parameters are only used if the model has a separate suspension, 
    ; and the locomotor has HasSuspension = Yes.

    LeftFrontTireBone = Tire01
    RightFrontTireBone = Tire04
    LeftRearTireBone = Tire03
    RightRearTireBone = Tire02

    TireRotationMultiplier      = 0.2   ; this * speed = rotation.
    PowerslideRotationAddition  = 0   ; This vehicle doesn't powerslide.

  ParticlesAttachedToAnimatedBones = Yes 


  End


  ; ***DESIGN parameters ***
  DisplayName      = OBJECT:Backhoe
  Side             = GLADemolitionGeneral
  EditorSorting    = VEHICLE
 
  TransportSlotCount  = 4                 ;how many "slots" we take in a transport (0 == not transportable)
  
  WeaponSet
    Conditions = None 
    Weapon = PRIMARY None
    Weapon = SECONDARY None
    Weapon = TERTIARY None
  End
  WeaponSet
    Conditions = MINE_CLEARING_DETAIL 
    Weapon = PRIMARY DozerMineDisarmingWeapon
    Weapon = SECONDARY None
    Weapon = TERTIARY None
  End
  WeaponSet
    Conditions = PLAYER_UPGRADE
    Weapon = PRIMARY None
    Weapon = SECONDARY None
    Weapon = TERTIARY TerroristSuicideNotARealWeapon
    AutoChooseSources = TERTIARY NONE
  End
  WeaponSet
    Conditions = PLAYER_UPGRADE MINE_CLEARING_DETAIL
    Weapon = PRIMARY DozerMineDisarmingWeapon
    Weapon = SECONDARY None
    Weapon = TERTIARY TerroristSuicideNotARealWeapon
    AutoChooseSources = TERTIARY NONE
  End
 
  ArmorSet
    Conditions        = None
    Armor             = DozerArmor ;Special Explosion-Proof Armor
    DamageFX          = TankDamageFX
  End

  BuildCost              = 900
  BuildTime              = 5.0          ;in seconds    
  VisionRange            = 150
  ShroudClearingRange = 300
  Prerequisites
    ;Object = GLACommandCenter
  End

  CrusherLevel           = 2  ;What can I crush?: 1 = infantry, 2 = trees, 3 = vehicles
  CrushableLevel         = 2  ;What am I?:        0 = for infantry, 1 = for trees, 2 = general vehicles
  CommandSet = Demo_GLAWorkerCommandSet

  ; *** AUDIO Parameters ***
  VoiceSelect = WorkerVoiceSelect
  VoiceMove = WorkerVoiceMove
  VoiceGuard = WorkerVoiceMove
  VoiceAttack = WorkerVoiceMove
  VoiceTaskComplete = WorkerVoiceBuildComplete
  SoundMoveStart = CarMoveStart
  SoundMoveStartDamaged = CarMoveStart
  SoundEnter = HumveeEnter
  SoundExit = HumveeExit

  UnitSpecificSounds
  ; These have the syntax of SomeNameSomewhereInCode = SomeNameSomewhereInLookupINIs
    VoiceCreate = WorkerVoiceCreate
    VoiceNoBuild = WorkerVoiceBuildNot
    TruckLandingSound = RocketBuggyLand
    TruckPowerslideSound = RocketBuggyPowerslide
    VoiceRepair = WorkerVoiceRepair
    VoiceDisarm = WorkerVoiceClearMine
    VoiceEnter = WorkerVoiceMoveUpgraded
    VoiceEnterHostile = WorkerVoiceMoveUpgraded
    VoiceGarrison = WorkerVoiceGarrison
    VoiceBuildResponse = WorkerVoiceBuild
    ;VoiceNoBuild = DozerUSAVoiceBuildNot
  End

  ; *** ENGINEERING Parameters ***  
  KindOf          = PRELOAD VEHICLE SCORE SELECTABLE CAN_CAST_REFLECTIONS DOZER
  RadarPriority   = UNIT

  Body            = ActiveBody ModuleTag_02
    MaxHealth       = 225.0
    InitialHealth   = 225.0

    ; Subdual damage "Subdues" you (reaction defined by BodyModule) when it passes your max health.
    ; The cap limits how extra-subdued you can be, and the other numbers detemine how fast it drains away on its own.
    SubdualDamageCap = 500
    SubdualDamageHealRate = 500
    SubdualDamageHealAmount = 50
  End

  Behavior            = PhysicsBehavior ModuleTag_03
    Mass              = 75.0
  End

  Behavior = StealthDetectorUpdate ModuleTag_04
    DetectionRate         = 500   ; how often to rescan for stealthed things in my sight (msec)
    ;DetectionRange       = ??? ;Dustin, enable this for independant balancing!
    CanDetectWhileGarrisoned  = No ;Garrisoned means being in a structure that you units can shoot out of.
    CanDetectWhileContained   = No ;Contained means being in a transport or tunnel network.
    ExtraRequiredKindOf   = MINE  ; we can only detect MINES, not other stealthed things
  End

  Behavior                 = TransitionDamageFX ModuleTag_05
    ReallyDamagedParticleSystem1 = Bone:Smoke RandomBone:Yes PSys:SmokeSmallContinuous01
    ReallyDamagedFXList1 = Loc: X:0 Y:0 Z:0 FXList:FX_BattleMasterDamageTransition
  End

  Behavior = DestroyDie ModuleTag_DeathTag06
    ;nothing
  End
  Behavior = CreateObjectDie ModuleTag_DeathTag07
    CreationList = OCL_GenericCarExplode
  End
  Behavior = FXListDie ModuleTag_DeathTag08
    DeathFX = FX_GenericCarExplode
  End

  ; Catch fire, and explode death
  Behavior = SlowDeathBehavior ModuleTag_09
    DeathTypes = ALL -CRUSHED -SPLATTED
    ProbabilityModifier = 100
    DestructionDelay = 1500
    DestructionDelayVariance = 600
    FX   = INITIAL  FX_CrusaderCatchFire
    FX   = MIDPOINT FX_ToxinTractorDie
    OCL  = FINAL OCL_ToxinTractorDeathEffect
  End

  Behavior = DozerAIUpdate ModuleTag_10
    RepairHealthPercentPerSecond = 2%    ; % of max health to repair each second
    BoredTime                    = 5000  ; in milliseconds
    BoredRange                   = 150   ; when bored, we look this far away to do something
    ; the only "enemies" that workers can acquire are mines, to be disarmed...
    AutoAcquireEnemiesWhenIdle   = Yes
  End

  Locomotor = SET_NORMAL AmericaVehicleDozerLocomotor

  Behavior = FlammableUpdate ModuleTag_11
    AflameDuration = 5000         ; If I catch fire, I'll burn for this long...
    AflameDamageAmount = 5       ; taking this much damage...
    AflameDamageDelay = 500       ; this often.
  End

  Behavior = CreateCrateDie ModuleTag_CratesChange
    CrateData = SalvageCrateData
  End
  
  Behavior = FlammableUpdate ModuleTag_12
    AflameDuration = 5000         ; If I catch fire, I'll burn for this long...
    AflameDamageAmount = 3       ; taking this much damage...
    AflameDamageDelay = 500       ; this often.
  End

  Behavior = CommandSetUpgrade ModuleTag_13
    TriggeredBy = Upgrade_GLAWorkerFakeCommandSet
    RemovesUpgrades = Upgrade_GLAWorkerRealCommandSet
    CommandSet = Demo_GLAWorkerFakeBuildingsCommandSet
  End
 
  Behavior = CommandSetUpgrade ModuleTag_14
    TriggeredBy = Upgrade_GLAWorkerRealCommandSet
    RemovesUpgrades = Upgrade_GLAWorkerFakeCommandSet Upgrade_GLAWorkerRealCommandSet
    CommandSet = Demo_GLAWorkerCommandSet
  End
 
  Behavior = ProductionUpdate ModuleTag_15
    MaxQueueEntries = 1; For the command set switching upgrade
  End

;;;;;;;;  ClientUpdate         = AnimatedParticleSysBoneClientUpdate ModuleTag_16
;;;;;;;;  End

  Behavior                    = SlowDeathBehavior  ModuleTag_17
    DeathTypes                = ALL -CRUSHED -SPLATTED
    ProbabilityModifier       = 5
    ModifierBonusPerOverkillPercent = 20%  ; negative means less likely to pick this in the face of much damage, positive means more likely
    DestructionDelay          = 0
    DestructionDelayVariance  = 200
    FX                        = INITIAL FX_ToxinTractorDie
    OCL                       = INITIAL OCL_ToxinTractorDeathEffect
    FX                        = FINAL FX_ToxinTruckExplosionOneFinal
  End
  Behavior                    = InstantDeathBehavior  ModuleTag_18
    DeathTypes                = NONE +CRUSHED +SPLATTED
    FX                        = FX_CarCrush
    OCL                       = OCL_CrusaderTank_CrushEffect
  End

  Behavior = FireWeaponWhenDeadBehavior ModuleTag_George 
    DeathWeapon   = Demo_SuicideDynamitePackPlusFire
    StartsActive  = No
    TriggeredBy   = Demo_Upgrade_SuicideBomb
    DeathTypes = ALL
  End;

  Behavior = FireWeaponWhenDeadBehavior ModuleTag_Bob
    DeathWeapon   = Demo_SuicideDynamitePackPlusFire
    StartsActive  = No
    TriggeredBy   = Demo_Upgrade_SuicideBomb
    DeathTypes = NONE 
  End

  Behavior = WeaponSetUpgrade ModuleTag_19
    TriggeredBy = Demo_Upgrade_SuicideBomb
  End

  Behavior = AutoHealBehavior ModuleTag_20
    HealingAmount = 2
    HealingDelay = 1000 ; msec
    TriggeredBy = Upgrade_GLAJunkRepair
  End

  Geometry        = BOX
  GeometryIsSmall = Yes
  GeometryMajorRadius = 15.0
  GeometryMinorRadius = 8.0
  GeometryHeight  = 12.0
  Scale = 1.0
  Shadow          = SHADOW_VOLUME

End

;------------------------------------------------------------------------------
Object Chem_GLAVehicleBackhoe

  ; *** ART Parameters ***
  SelectPortrait         = SAGLABackhoe_L
  ButtonImage            = SAGLABackhoe

  UpgradeCameo1 = Upgrade_GLAJunkRepair
  ;UpgradeCameo2 = NONE
  ;UpgradeCameo3 = NONE
  ;UpgradeCameo4 = NONE
  ;UpgradeCameo5 = NONE

  ;Draw = W3DModelDraw ModuleTag_01
  Draw = W3DTruckDraw ModuleTag_TruckDraw
    ConditionState = NONE
      Model = CVBACKHOE
      ParticleSysBone   = EXHAUSTFX01 DozerSmokeLight
      WaitForStateToFinishIfPossible = TRANS_DIGGING
    End

    ConditionState = PREATTACK_A
      Model             = CVBACKHOE 
      Animation         = NVCONSTDOZ_A.NVCONSTDOZ_A
      AnimationMode     = ONCE
      ParticleSysBone   = EXHAUSTFX01 DozerSmokeHeavy
      ParticleSysBone   = DIRTFX01 DozerDirtFall ;gush of dirt
      TransitionKey     = TRANS_DIGGING
    End

    ConditionState = MOVING
      Model             = CVBACKHOE
      ParticleSysBone   = EXHAUSTFX01 DozerSmokeHeavy
      WaitForStateToFinishIfPossible = TRANS_DIGGING
    End
    
    ConditionState = REALLYDAMAGED
      Model = CVBACKHOE
      ParticleSysBone   = EXHAUSTFX01 DozerSmokeHeavy
      WaitForStateToFinishIfPossible = TRANS_DIGGING_DAMAGED
    End

    ConditionState = PREATTACK_A REALLYDAMAGED RUBBLE
      Model             = CVBACKHOE
      Animation         = NVCONSTDOZ_AD.NVCONSTDOZ_AD
      AnimationMode     = ONCE
      ParticleSysBone   = EXHAUSTFX01 DozerSmokeHeavy
      ParticleSysBone   = DIRTFX01 DozerDirtFall ;gush of dirt
      TransitionKey     = TRANS_DIGGING_DAMAGED
    End

    ConditionState      = MOVING REALLYDAMAGED RUBBLE
      Model             = CVBACKHOE
      ParticleSysBone   = EXHAUSTFX01 DozerSmokeHeavy
      WaitForStateToFinishIfPossible = TRANS_DIGGING_DAMAGED
    End
    
    ConditionState = RUBBLE
      Model = CVBACKHOE_D
    End
    
    TrackMarks            = EXTireTrack2.tga
    Dust                  = RocketBuggyDust
    DirtSpray             = RocketBuggyDirtSpray

    ; These parameters are only used if the model has a separate suspension, 
    ; and the locomotor has HasSuspension = Yes.

    LeftFrontTireBone = Tire01
    RightFrontTireBone = Tire04
    LeftRearTireBone = Tire03
    RightRearTireBone = Tire02

    TireRotationMultiplier      = 0.2   ; this * speed = rotation.
    PowerslideRotationAddition  = 0   ; This vehicle doesn't powerslide.

  ParticlesAttachedToAnimatedBones = Yes 


  End


  ; ***DESIGN parameters ***
  DisplayName      = OBJECT:Backhoe
  Side             = GLAToxinGeneral
  EditorSorting    = VEHICLE
 
  TransportSlotCount  = 4                 ;how many "slots" we take in a transport (0 == not transportable)
  
  WeaponSet
    Conditions = None
    Weapon = PRIMARY None
  End

  WeaponSet
    Conditions = MINE_CLEARING_DETAIL 
    Weapon = PRIMARY DozerMineDisarmingWeapon
  End
 
  ArmorSet
    Conditions        = None
    Armor             = DozerArmor ;Special Explosion-Proof Armor
    DamageFX          = TankDamageFX
  End

  BuildCost              = 900
  BuildTime              = 5.0          ;in seconds    
  VisionRange            = 150
  ShroudClearingRange = 300
  Prerequisites
    ;Object = GLACommandCenter
  End

  CrusherLevel           = 2  ;What can I crush?: 1 = infantry, 2 = trees, 3 = vehicles
  CrushableLevel         = 2  ;What am I?:        0 = for infantry, 1 = for trees, 2 = general vehicles
  CommandSet = Chem_GLAWorkerCommandSet

  ; *** AUDIO Parameters ***
  VoiceSelect = WorkerVoiceSelect
  VoiceMove = WorkerVoiceMove
  VoiceGuard = WorkerVoiceMove
  VoiceAttack = WorkerVoiceMove
  VoiceTaskComplete = WorkerVoiceBuildComplete
  SoundMoveStart = CarMoveStart
  SoundMoveStartDamaged = CarMoveStart
  SoundEnter = HumveeEnter
  SoundExit = HumveeExit

  UnitSpecificSounds
  ; These have the syntax of SomeNameSomewhereInCode = SomeNameSomewhereInLookupINIs
    VoiceCreate = WorkerVoiceCreate
    VoiceNoBuild = WorkerVoiceBuildNot
    TruckLandingSound = RocketBuggyLand
    TruckPowerslideSound = RocketBuggyPowerslide
    VoiceRepair = WorkerVoiceRepair
    VoiceDisarm = WorkerVoiceClearMine
    VoiceEnter = WorkerVoiceMoveUpgraded
    VoiceEnterHostile = WorkerVoiceMoveUpgraded
    VoiceGarrison = WorkerVoiceGarrison
    VoiceBuildResponse = WorkerVoiceBuild
    ;VoiceNoBuild = DozerUSAVoiceBuildNot
  End

  ; *** ENGINEERING Parameters ***  
  KindOf          = PRELOAD VEHICLE SCORE SELECTABLE CAN_CAST_REFLECTIONS DOZER
  RadarPriority   = UNIT

  Body            = ActiveBody ModuleTag_02
    MaxHealth       = 225.0
    InitialHealth   = 225.0

    ; Subdual damage "Subdues" you (reaction defined by BodyModule) when it passes your max health.
    ; The cap limits how extra-subdued you can be, and the other numbers detemine how fast it drains away on its own.
    SubdualDamageCap = 500
    SubdualDamageHealRate = 500
    SubdualDamageHealAmount = 50
  End

  Behavior            = PhysicsBehavior ModuleTag_03
    Mass              = 75.0
  End

  Behavior = StealthDetectorUpdate ModuleTag_04
    DetectionRate         = 500   ; how often to rescan for stealthed things in my sight (msec)
    ;DetectionRange       = ??? ;Dustin, enable this for independant balancing!
    CanDetectWhileGarrisoned  = No ;Garrisoned means being in a structure that you units can shoot out of.
    CanDetectWhileContained   = No ;Contained means being in a transport or tunnel network.
    ExtraRequiredKindOf   = MINE  ; we can only detect MINES, not other stealthed things
  End

  Behavior                 = TransitionDamageFX ModuleTag_05
    ReallyDamagedParticleSystem1 = Bone:Smoke RandomBone:Yes PSys:SmokeSmallContinuous01
    ReallyDamagedFXList1 = Loc: X:0 Y:0 Z:0 FXList:FX_BattleMasterDamageTransition
  End

  Behavior = DestroyDie ModuleTag_DeathTag06
    ;nothing
  End
  Behavior = CreateObjectDie ModuleTag_DeathTag07
    CreationList = OCL_GenericCarExplode
  End
  Behavior = FXListDie ModuleTag_DeathTag08
    DeathFX = FX_GenericCarExplode
  End

  ; Catch fire, and explode death
  Behavior = SlowDeathBehavior ModuleTag_09
    DeathTypes = ALL -CRUSHED -SPLATTED
    ProbabilityModifier = 100
    DestructionDelay = 1500
    DestructionDelayVariance = 600
    FX   = INITIAL  FX_CrusaderCatchFire
    FX   = MIDPOINT FX_ToxinTractorDie
    OCL  = FINAL OCL_ToxinTractorDeathEffect
  End

  Behavior = DozerAIUpdate ModuleTag_10
    RepairHealthPercentPerSecond = 2%    ; % of max health to repair each second
    BoredTime                    = 5000  ; in milliseconds
    BoredRange                   = 150   ; when bored, we look this far away to do something
    ; the only "enemies" that workers can acquire are mines, to be disarmed...
    AutoAcquireEnemiesWhenIdle   = Yes
  End

  Locomotor = SET_NORMAL AmericaVehicleDozerLocomotor

  Behavior = FlammableUpdate ModuleTag_11
    AflameDuration = 5000         ; If I catch fire, I'll burn for this long...
    AflameDamageAmount = 5       ; taking this much damage...
    AflameDamageDelay = 500       ; this often.
  End

  Behavior = CreateCrateDie ModuleTag_CratesChange
    CrateData = SalvageCrateData
  End
  
  Behavior = FlammableUpdate ModuleTag_12
    AflameDuration = 5000         ; If I catch fire, I'll burn for this long...
    AflameDamageAmount = 3       ; taking this much damage...
    AflameDamageDelay = 500       ; this often.
  End

  Behavior = CommandSetUpgrade ModuleTag_13
    TriggeredBy = Upgrade_GLAWorkerFakeCommandSet
    RemovesUpgrades = Upgrade_GLAWorkerRealCommandSet
    CommandSet = Chem_GLAWorkerFakeBuildingsCommandSet
  End
 
  Behavior = CommandSetUpgrade ModuleTag_14
    TriggeredBy = Upgrade_GLAWorkerRealCommandSet
    RemovesUpgrades = Upgrade_GLAWorkerFakeCommandSet Upgrade_GLAWorkerRealCommandSet
    CommandSet = Chem_GLAWorkerCommandSet
  End
 
  Behavior = ProductionUpdate ModuleTag_15
    MaxQueueEntries = 1; For the command set switching upgrade
  End

;;;;;;;;  ClientUpdate         = AnimatedParticleSysBoneClientUpdate ModuleTag_16
;;;;;;;;  End

  Behavior                    = SlowDeathBehavior  ModuleTag_17
    DeathTypes                = ALL -CRUSHED -SPLATTED
    ProbabilityModifier       = 5
    ModifierBonusPerOverkillPercent = 20%  ; negative means less likely to pick this in the face of much damage, positive means more likely
    DestructionDelay          = 0
    DestructionDelayVariance  = 200
    FX                        = INITIAL FX_ToxinTractorDie
    OCL                       = INITIAL OCL_ToxinTractorDeathEffect
    FX                        = FINAL FX_ToxinTruckExplosionOneFinal
  End
  Behavior                    = InstantDeathBehavior  ModuleTag_18
    DeathTypes                = NONE +CRUSHED +SPLATTED
    FX                        = FX_CarCrush
    OCL                       = OCL_CrusaderTank_CrushEffect
  End

  Behavior = AutoHealBehavior ModuleTag_19
    HealingAmount = 2
    HealingDelay = 1000 ; msec
    TriggeredBy = Upgrade_GLAJunkRepair
  End

  Geometry        = BOX
  GeometryIsSmall = Yes
  GeometryMajorRadius = 15.0
  GeometryMinorRadius = 8.0
  GeometryHeight  = 12.0
  Scale = 1.0
  Shadow          = SHADOW_VOLUME

End

;------------------------------------------------------------------------------
Object GLAVehicleFerry

  ; *** ART Parameters ***
  SelectPortrait         = SSFerry_L
  ButtonImage            = SSFerry_L
  Draw                = W3DModelDraw ModuleTag_01
  
    ConditionState    = NONE
      Model           = CVFerry
    End

    ConditionState    = OVER_WATER
      Model           = CVFerry
      ParticleSysBone = Smoke01 FerrySmokeStop
    End

    ConditionState    = MOVING OVER_WATER
      Model           = CVFerry
      ParticleSysBone = Smoke01 FerrySmoke

      ParticleSysBone = TreadFX01 AmphibWave
      ParticleSysBone = TreadFX02 AmphibWave
    End
    
  End

  ; ***DESIGN parameters ***
  DisplayName         = OBJECT:AutoFerry
  Side                = GLA
  EditorSorting       = VEHICLE
  CommandSet          = Infa_ChinaTroopCrawlerCommandSet
  ArmorSet
    Armor           = TruckArmor
    DamageFX        = DefaultDamageFX
  End
  WeaponSet
    Conditions        = None
    Weapon            = PRIMARY GattlingBuildingGun
    Weapon            = SECONDARY PatriotMissileWeapon
    Weapon            = TERTIARY PatriotMissileWeaponAir
  End
  VisionRange         = 200
  CrushableLevel      = 3  ;What am I?:        0 = for infantry, 1 = for trees, 2 = general vehicles

  ; *** AUDIO Parameters ***
  SoundMoveLoop       = FerryMoveLoop
  SoundAmbient        = Amb_UrbanDocksFoghorn
  VoiceSelect = BattleBusVoiceSelect
  VoiceMove = BattleBusVoiceMove
  VoiceGuard = BattleBusVoiceMove
  VoiceAttack = BattleBusVoiceAttack
  SoundEnter = HumveeEnter
  SoundExit = HumveeExit

  UnitSpecificSounds
    ; These have the syntax of SomeNameSomewhereInCode = SomeNameSomewhereInLookupINIs
    VoiceCreate                   = BattleBusVoiceCreate
    VoiceUnload                   = BattleBusVoiceUnload
  End



  ; *** ENGINEERING Parameters ***  
  RadarPriority = UNIT
  KindOf              = SELECTABLE TRANSPORT PRELOAD CAN_ATTACK ATTACK_NEEDS_LINE_OF_SIGHT CAN_CAST_REFLECTIONS VEHICLE SCORE BOAT

  Body                = ActiveBody ModuleTag_02
    MaxHealth         = 1400.0
    InitialHealth     = 1400.0
  End

  Behavior               = DestroyDie ModuleTag_31
                    ;nothing
  End
  Behavior               = CreateObjectDie ModuleTag_32
    DeathTypes = ALL
    CreationList    = OCL_LargeStructureDebris
  End
  Behavior               = FXListDie ModuleTag_33
    DeathTypes = ALL -FLOODED
    DeathFX         = FX_StructureMediumDeath
  End
 
  Behavior              = TransportContain ModuleTag_04
    Slots               = 10
    AllowInsideKindOf   = INFANTRY VEHICLE
    DoorOpenTime        = 200
    ScatterNearbyOnExit = No ; I have bones for exiting
  End
 
  Behavior            = PhysicsBehavior ModuleTag_40
    Mass              = 300.0
  End

  ;Behavior = RailedTransportAIUpdate ModuleTag_05
    ;PathPrefixName    = Ferry
  ;End
  ;Behavior = RailedTransportDockUpdate ModuleTag_06
    ;NumberApproachPositions = 9
    ;PullInsideDuration      = 4500  ; in milliseconds
    ;PushOutsideDuration     = 4500  ; in milliseconds
    ;ToleranceDistance       = 400.0  ; max distance from ferry in order to successfully dock.
  ;End
  ;Locomotor           = SET_NORMAL BasicBoatLocomotor
  ;Behavior                 = DestroyDie ModuleTag_07
    ;<NO DATA>
  ;End

  Behavior = AIUpdateInterface ModuleTag_20
    Turret
      TurretTurnRate = 180       ; turn rate, in degrees per sec
      NaturalTurretAngle = 0
      MinIdleScanAngle = 30      ; in degrees off the natural turret angle
      MaxIdleScanAngle = 60      ; in degrees off the natural turret angle
      MinIdleScanInterval = 5000 ; in milliseconds
      MaxIdleScanInterval = 10000 ; in milliseconds
      ControlledWeaponSlots = PRIMARY SECONDARY TERTIARY
    End
    AutoAcquireEnemiesWhenIdle = Yes
  End
  Locomotor       = SET_NORMAL BasicBoatLocomotor

  Behavior = FlammableUpdate ModuleTag_21
    AflameDuration = 5000         ; If I catch fire, I'll burn for this long...
    AflameDamageAmount = 5       ; taking this much damage...
    AflameDamageDelay = 500       ; this often.
  End

  Behavior = FloatUpdate UpdateTag_01
    Enabled = No ; 'no' because we dont want to be lifted by this update, just swayed around like a buoy
  End


  Geometry            = BOX
  GeometryIsSmall     = No
  GeometryMajorRadius = 72.0
  GeometryMinorRadius = 25.0
  GeometryHeight      = 20.0
  Shadow              = SHADOW_VOLUME

End

;------------------------------------------------------------------------------
Object GLAVehiclePTBoat

  ; *** ART Parameters ***
  
  SelectPortrait         = SAPTBoat
  ButtonImage            = SAPTBoat
  
  UpgradeCameo1 =  Upgrade_GLAJunkRepair
  ;UpgradeCameo2 = NONE
  ;UpgradeCameo3 = NONE
  ;UpgradeCameo4 = NONE
  ;UpgradeCameo5 = NONE

  Draw              = W3DModelDraw ModuleTag_01 ; Boat 
    OkToChangeModelColor = Yes
    ConditionState  = NONE
      Model         = AVPTBoat
    End

    ConditionState  = OVER_WATER
      Model         = AVPTBoat
      ParticleSysBone = Smoke01 FerrySmokeStop
    End

    ConditionState  = MOVING OVER_WATER
      Model         = AVPTBoat
      ParticleSysBone = Smoke01 FerrySmoke
      ParticleSysBone = TreadFX01 AmphibWave
    End
  End

  Draw = W3DModelDraw             ModuleTag_02 ; Gunner 
    OkToChangeModelColor = Yes
    AttachToBoneInAnotherModule = Dum_Turret

       DefaultConditionState
      Model = UITech_SKN
      Turret = Dum-TurManMVR
      TurretArtAngle = 180  ; this turret has art pointed 180 degrees backward
      HideSubObject = 20Cal 50Cal RPG MuzzleFX01 MuzzleFX02 MuzzleFX03
      IdleAnimation = UITech_SKL.UITech_STA 0 6
      IdleAnimation = UITech_SKL.UITech_IDA
      IdleAnimation = UITech_SKL.UITech_IDB
      AnimationMode = ONCE
      ShowSubObject = 20Cal
      WeaponMuzzleFlash = PRIMARY MuzzleFX01
      WeaponFireFXBone = PRIMARY Muzzle01
    End

    ConditionState = RUBBLE MOVING TURRET_ROTATE
      Animation = None
      HideSubObject = UITech-SKN
      ShowSubObject = 20Cal
      WeaponMuzzleFlash = PRIMARY MuzzleFX01
      WeaponFireFXBone = PRIMARY Muzzle01
    End

    ConditionState = MOVING
      Animation = UITech_SKL.UITech_MVB
      AnimationMode = LOOP
      ShowSubObject = 20Cal
      WeaponMuzzleFlash = PRIMARY MuzzleFX01
      WeaponFireFXBone = PRIMARY Muzzle01
    End

    ConditionState = TURRET_ROTATE
      Animation = UITech_SKL.UITech_TNA
      AnimationMode = LOOP
      ShowSubObject = 20Cal
      WeaponMuzzleFlash = PRIMARY MuzzleFX01
      WeaponFireFXBone = PRIMARY Muzzle01
    End
    AliasConditionState = TURRET_ROTATE MOVING
    AliasConditionState = TURRET_ROTATE FIRING_A
    AliasConditionState = TURRET_ROTATE BETWEEN_FIRING_SHOTS_A
    AliasConditionState = TURRET_ROTATE RELOADING_A
    AliasConditionState = TURRET_ROTATE MOVING FIRING_A
    AliasConditionState = TURRET_ROTATE MOVING BETWEEN_FIRING_SHOTS_A
    AliasConditionState = TURRET_ROTATE MOVING RELOADING_A

    ConditionState = FIRING_A 
      Animation = UITech_SKL.UITech_ATA
      AnimationMode = LOOP
      ShowSubObject = 20Cal
      WeaponMuzzleFlash = PRIMARY MuzzleFX01
      WeaponFireFXBone = PRIMARY Muzzle01
    End

    ; AliasConditionState is a new keyword that says,
    ; "give me another ConditionState exactly like the previous
    ; one, except with different conditions". Useful when you
    ; have several states that are the same with only different condition bits.
    AliasConditionState = BETWEEN_FIRING_SHOTS_A
    AliasConditionState = RELOADING_A

    ; these aliases handle the moving-between-shots case. (we can't actually move-and-fire at the same time.).
    AliasConditionState = MOVING FIRING_A
    AliasConditionState = MOVING BETWEEN_FIRING_SHOTS_A
    AliasConditionState = MOVING RELOADING_A
  End  
  

  ; ***DESIGN parameters ***
  DisplayName        = OBJECT:PTBoat
  Side               = GLA
  EditorSorting      = VEHICLE
  TransportSlotCount = 10                 ;how many "slots" we take in a transport (0 == not transportable)
  CommandSet         = GenericCommandSet
  
  ArmorSet
    Armor           = TruckArmor
    DamageFX        = DefaultDamageFX
  End

  WeaponSet
    Conditions      = None
    Weapon          = PRIMARY PTBoatGun
    Weapon          = SECONDARY BradleyTOWMissileWeapon
  End

  VisionRange         = 250
  ShroudClearingRange = 300
  CrusherLevel        = 0  ;What can I crush?: 1 = infantry, 2 = trees, 3 = vehicles
  CrushableLevel      = 3  ;What am I?:        0 = for infantry, 1 = for trees, 2 = general vehicles

  ; *** AUDIO Parameters ***
  SoundMoveLoop = AmphibiousTransportMoveLoop
  VoiceSelect           = QuadCannonVoiceSelect
  VoiceMove             = QuadCannonVoiceMove
  VoiceAttack           = QuadCannonVoiceAttack
  VoiceAttackAir        = QuadCannonVoiceAttackAir
  VoiceGuard             = QuadCannonVoiceMove

  UnitSpecificSounds
   ; These have the syntax of SomeNameSomewhereInCode = SomeNameSomewhereInLookupINIs
    VoiceCreate         = QuadCannonVoiceCreate
   VoiceCrush           = QuadCannonVoiceCrush
   VoiceEnter             = QuadCannonVoiceMove
  End

  ; *** ENGINEERING Parameters ***  
  KindOf            = PRELOAD SELECTABLE CAN_ATTACK ATTACK_NEEDS_LINE_OF_SIGHT CAN_CAST_REFLECTIONS VEHICLE SCORE BOAT
  RadarPriority          = UNIT

  Body              = ActiveBody ModuleTag_03
    MaxHealth       = 750.0
    InitialHealth   = 750.0
  End
  
  Behavior               = DestroyDie ModuleTag_04
                    ;nothing
  End
  Behavior               = CreateObjectDie ModuleTag_05
    DeathTypes = ALL
    CreationList    = OCL_GenericCarExplode
  End
  Behavior               = FXListDie ModuleTag_06
    DeathTypes = ALL -FLOODED
    DeathFX         = FX_GenericCarExplode
  End

  Behavior = AIUpdateInterface ModuleTag_07
    Turret
      TurretTurnRate = 180       ; turn rate, in degrees per sec
      NaturalTurretAngle = 0
      MinIdleScanAngle = 30      ; in degrees off the natural turret angle
      MaxIdleScanAngle = 60      ; in degrees off the natural turret angle
      MinIdleScanInterval = 5000 ; in milliseconds
      MaxIdleScanInterval = 10000 ; in milliseconds
      ControlledWeaponSlots = PRIMARY
    End
    AutoAcquireEnemiesWhenIdle = Yes
  End
  Locomotor       = SET_NORMAL BasicBoatLocomotor

  Behavior          = PhysicsBehavior ModuleTag_08
    Mass            = 30.0
  End

  Behavior = FlammableUpdate ModuleTag_21
    AflameDuration = 5000         ; If I catch fire, I'll burn for this long...
    AflameDamageAmount = 5       ; taking this much damage...
    AflameDamageDelay = 500       ; this often.
  End

  Behavior = ExperienceScalarUpgrade ModuleTag_22
    TriggeredBy = Upgrade_AmericaAdvancedTraining
    AddXPScalar = 1.0 ;Increases experience gained by an additional 100%
  End

  Behavior = FloatUpdate UpdateTag_23
    Enabled = No ; 'no' because we dont want to be lifted by this update, just swayed around like a buoy
  End

  Geometry            = BOX
  Scale = 1.0                            ;Scaling
  GeometryIsSmall     = No
  GeometryMajorRadius = 48.0
  GeometryMinorRadius = 12.0
  GeometryHeight      = 14.0
  Shadow              = SHADOW_VOLUME

End

;------------------------------------------------------------------------------
Object GLABoatFishingTrowler

  ; *** ART Parameters ***
  SelectPortrait         = SAGLAFshgTwlr
  ButtonImage            = SAGLAFshgTwlr

 Draw = W3DModelDraw ModuleTag_01
    ConditionState = NONE
      Model = CVTROWLER
    End
    ConditionState  = OVER_WATER
      Model         = CVTROWLER
      ParticleSysBone = Smoke01 FerrySmokeStop
    End

    ConditionState  = MOVING OVER_WATER
      Model         = CVTROWLER
      ParticleSysBone = Smoke01 FerrySmoke
      ParticleSysBone = TreadFX01 AmphibWave
    End
  End

  ; ***DESIGN parameters ***
  DisplayName     = OBJECT:FishingTrowler
  Side            = GLA
  EditorSorting   = VEHICLE
 
  TransportSlotCount  = 10                 ;how many "slots" we take in a transport (0 == not transportable)
  WeaponSet
    Conditions = None
    Weapon = PRIMARY QuadCannonGun
    Weapon = SECONDARY QuadCannonGunAir
  End
  WeaponSet
    Conditions = CARBOMB
    Weapon = PRIMARY  SuicideCarBomb
  End

  VisionRange         = 250
  ShroudClearingRange = 300
  CrusherLevel        = 0  ;What can I crush?: 1 = infantry, 2 = trees, 3 = vehicles
  CrushableLevel      = 3  ;What am I?:        0 = for infantry, 1 = for trees, 2 = general vehicles
 
  ArmorSet
    Armor           = TruckArmor
    DamageFX        = CrushableCarDamageFX
  End
  CommandSet        = Infa_ChinaTroopCrawlerCommandSet

  ; *** AUDIO Parameters ***
  SoundMoveLoop       = FerryMoveLoop
  SoundAmbient        = Amb_UrbanDocksFoghorn
  VoiceSelect           = QuadCannonVoiceSelect
  VoiceMove             = QuadCannonVoiceMove
  VoiceAttack           = QuadCannonVoiceAttack
  VoiceAttackAir        = QuadCannonVoiceAttackAir
  VoiceGuard             = QuadCannonVoiceMove

  UnitSpecificSounds
   ; These have the syntax of SomeNameSomewhereInCode = SomeNameSomewhereInLookupINIs
    VoiceCreate         = QuadCannonVoiceCreate
   VoiceCrush           = QuadCannonVoiceCrush
   VoiceEnter             = QuadCannonVoiceMove
  End

  ; *** ENGINEERING Parameters ***  
  KindOf          = SELECTABLE CAN_ATTACK VEHICLE BOAT TRANSPORT
  RadarPriority   = UNIT

  Body            = ActiveBody ModuleTag_02
    MaxHealth       = 600.0
    InitialHealth   = 600.0
  End

  Behavior              = TransportContain ModuleTag_40
    Slots               = 6
    AllowInsideKindOf   = INFANTRY VEHICLE
    DoorOpenTime        = 2000
    ScatterNearbyOnExit = Yes
  End

  Behavior = DestroyDie ModuleTag_03
    DeathTypes = ALL -CRUSHED -SPLATTED
  End
  Behavior = CrushDie ModuleTag_04
    DeathTypes = NONE +CRUSHED +SPLATTED
    ;TotalCrushSound     = CarAlarm
    ;BackEndCrushSound   = CarAlarm
    ;FrontEndCrushSound  = CarAlarm
    TotalCrushSoundPercent    = 50   
    BackEndCrushSoundPercent  = 50
    FrontEndCrushSoundPercent = 50
  End
  Behavior = SlowDeathBehavior ModuleTag_11
    DeathTypes = NONE +CRUSHED +SPLATTED
    SinkDelay = 14000
    SinkRate = 2     ; in Dist/Sec
    DestructionDelay = 20000
  End

  Behavior = FXListDie ModuleTag_05
    DeathTypes = NONE +CRUSHED +SPLATTED
    DeathFX = FX_CarCrush
  End
  Behavior = CreateObjectDie ModuleTag_06
    DeathTypes = ALL -CRUSHED -SPLATTED
    CreationList = OCL_GenericCarExplode
  End
  Behavior = FXListDie ModuleTag_07
    DeathTypes = ALL -CRUSHED -SPLATTED -FLOODED
    DeathFX = FX_GenericCarExplode
  End
  Behavior = CreateObjectDie ModuleTag_08
    DeathTypes = NONE +SUICIDED
    CreationList = OCL_BurnedCarHull
  End

  Behavior = AIUpdateInterface ModuleTag_09
   Turret
      TurretTurnRate = 180       ; turn rate, in degrees per sec
      NaturalTurretAngle = 0
      MinIdleScanAngle = 30      ; in degrees off the natural turret angle
      MaxIdleScanAngle = 60      ; in degrees off the natural turret angle
      MinIdleScanInterval = 5000 ; in milliseconds
      MaxIdleScanInterval = 10000 ; in milliseconds
      ControlledWeaponSlots = PRIMARY SECONDARY
    End
    AutoAcquireEnemiesWhenIdle = Yes
  End
   Locomotor       = SET_NORMAL BasicBoatLocomotor



  Behavior = PhysicsBehavior ModuleTag_10
    Mass = 30.0
  End

  Behavior = FlammableUpdate ModuleTag_21
    AflameDuration = 5000         ; If I catch fire, I'll burn for this long...
    AflameDamageAmount = 5       ; taking this much damage...
    AflameDamageDelay = 500       ; this often.
  End

  Behavior = FloatUpdate UpdateTag_01
    Enabled = No ; 'no' because we dont want to be lifted by this update, just swayed around like a buoy
  End

  Geometry        = BOX
  GeometryIsSmall = No
  GeometryMajorRadius = 27.0
  GeometryMinorRadius = 11.0
  GeometryHeight  = 13.0
  Scale = 1.02                            ;Scaling
  Shadow          = SHADOW_VOLUME

End

;------------------------------------------------------------------------------
Object GLABoatTugboat

  ; *** ART Parameters ***
  SelectPortrait         = SAGLATugboat
  ButtonImage            = SAGLATugboat

  Draw = W3DModelDraw ModuleTag_01
    ConditionState = NONE
      Model = CVTUGBOAT
    End

    ConditionState  = OVER_WATER
      Model         = CVTUGBOAT
      ParticleSysBone = Smoke01 FerrySmokeStop
    End

    ConditionState  = MOVING OVER_WATER
      Model         = CVTUGBOAT
      ParticleSysBone = Smoke01 FerrySmoke
      ParticleSysBone = TreadFX01 AmphibWave
    End
  End

  ; ***DESIGN parameters ***
  DisplayName     = OBJECT:Tugboat
  Side            = GLA
  EditorSorting   = VEHICLE
 
  TransportSlotCount  = 10                 ;how many "slots" we take in a transport (0 == not transportable)
  WeaponSet
    Conditions = None
    Weapon = PRIMARY ChinaInfantryTankHunterMissileLauncher
    Weapon = SECONDARY HumveeGun
  End
  WeaponSet
    Conditions = CARBOMB
    Weapon = PRIMARY  SuicideCarBomb
  End

  VisionRange         = 250
  ShroudClearingRange = 300
  CrusherLevel        = 0  ;What can I crush?: 1 = infantry, 2 = trees, 3 = vehicles
  CrushableLevel      = 3  ;What am I?:        0 = for infantry, 1 = for trees, 2 = general vehicles
 
  ArmorSet
    Armor           = TruckArmor
    DamageFX        = CrushableCarDamageFX
  End
    CommandSet      = Infa_ChinaTroopCrawlerCommandSet

  ; *** AUDIO Parameters ***
  SoundMoveLoop       = FerryMoveLoop
  SoundAmbient        = Amb_UrbanDocksFoghorn
  VoiceSelect           = TechnicalVoiceSelect
  VoiceMove             = TechnicalVoiceMove
  VoiceAttack           = TechnicalVoiceAttack
  VoiceAttackAir        = TechnicalVoiceAttack
  VoiceGuard             = TechnicalVoiceMove

  UnitSpecificSounds
   ; These have the syntax of SomeNameSomewhereInCode = SomeNameSomewhereInLookupINIs
    VoiceCreate         = TechnicalVoiceCreate
   VoiceCrush           = TechnicalVoiceCrush
   VoiceEnter             = TechnicalVoiceMove
  End

  ; *** ENGINEERING Parameters ***  
  KindOf          = SELECTABLE CAN_ATTACK VEHICLE BOAT TRANSPORT
  RadarPriority   = UNIT

  Body            = ActiveBody ModuleTag_02
    MaxHealth       = 740.0
    InitialHealth   = 740.0
  End

  Behavior              = TransportContain ModuleTag_40
    Slots               = 8
    AllowInsideKindOf   = INFANTRY VEHICLE
    DoorOpenTime        = 2000
    ScatterNearbyOnExit = Yes
  End

  Behavior = DestroyDie ModuleTag_03
    DeathTypes = ALL -CRUSHED -SPLATTED
  End
  Behavior = CrushDie ModuleTag_04
    DeathTypes = NONE +CRUSHED +SPLATTED
    ;TotalCrushSound     = CarAlarm
    ;BackEndCrushSound   = CarAlarm
    ;FrontEndCrushSound  = CarAlarm
    TotalCrushSoundPercent    = 50   
    BackEndCrushSoundPercent  = 50
    FrontEndCrushSoundPercent = 50
  End
  Behavior = SlowDeathBehavior ModuleTag_11
    DeathTypes = NONE +CRUSHED +SPLATTED
    SinkDelay = 14000
    SinkRate = 2     ; in Dist/Sec
    DestructionDelay = 20000
  End

  Behavior = FXListDie ModuleTag_05
    DeathTypes = NONE +CRUSHED +SPLATTED
    DeathFX = FX_CarCrush
  End
  Behavior = CreateObjectDie ModuleTag_06
    DeathTypes = ALL -CRUSHED -SPLATTED
    CreationList = OCL_GenericCarExplode
  End
  Behavior = FXListDie ModuleTag_07
    DeathTypes = ALL -CRUSHED -SPLATTED -FLOODED
    DeathFX = FX_GenericCarExplode
  End
  Behavior = CreateObjectDie ModuleTag_08
    DeathTypes = NONE +SUICIDED
    CreationList = OCL_BurnedCarHull
  End

  Behavior = AIUpdateInterface ModuleTag_09
   Turret
      TurretTurnRate = 180       ; turn rate, in degrees per sec
      NaturalTurretAngle = 0
      MinIdleScanAngle = 30      ; in degrees off the natural turret angle
      MaxIdleScanAngle = 60      ; in degrees off the natural turret angle
      MinIdleScanInterval = 5000 ; in milliseconds
      MaxIdleScanInterval = 10000 ; in milliseconds
      ControlledWeaponSlots = PRIMARY SECONDARY
    End
    AutoAcquireEnemiesWhenIdle = Yes
  End
   Locomotor       = SET_NORMAL BasicBoatLocomotor

  Behavior = PhysicsBehavior ModuleTag_10
    Mass = 30.0
  End

  Behavior = FlammableUpdate ModuleTag_21
    AflameDuration = 5000         ; If I catch fire, I'll burn for this long...
    AflameDamageAmount = 5       ; taking this much damage...
    AflameDamageDelay = 500       ; this often.
  End

  Behavior = FloatUpdate UpdateTag_01
    Enabled = No ; 'no' because we dont want to be lifted by this update, just swayed around like a buoy
  End

  Geometry        = BOX
  GeometryIsSmall = Yes
  GeometryMajorRadius = 26.0
  GeometryMinorRadius = 14.0
  GeometryHeight  = 13.0
  Scale = 1.07                            ;Scaling
  Shadow          = SHADOW_VOLUME

End

;------------------------------------------------------------------------------
Object GLABoatAsianFishing

  ; *** ART Parameters ***
  SelectPortrait         = SAGLAAznFshgBoat
  ButtonImage            = SAGLAAznFshgBoat

  Draw = W3DModelDraw ModuleTag_01
    ConditionState = NONE
      Model = CVJUNK
      ParticleSysBone = TreadFX01 AmphibWaveRest
    End
    
    ConditionState = REALLYDAMAGED
      Model = CVJUNK_D
      ParticleSysBone = TreadFX01 AmphibWaveRest
    End
    
    ConditionState = RUBBLE
      Model = CVJUNK_D
    End
  End
  

  ; ***DESIGN parameters ***
  DisplayName      = OBJECT:AsianFishingBoat
  Side            = GLA
  EditorSorting   = VEHICLE
 
  TransportSlotCount  = 10                 ;how many "slots" we take in a transport (0 == not transportable)
  WeaponSet
    Conditions = None
    Weapon = PRIMARY TechnicalMachineGunWeapon
  End
  WeaponSet
    Conditions = CARBOMB
    Weapon = PRIMARY  SuicideCarBomb
  End

  VisionRange         = 150
  ShroudClearingRange = 200
  CrusherLevel        = 0  ;What can I crush?: 1 = infantry, 2 = trees, 3 = vehicles
  CrushableLevel      = 3  ;What am I?:        0 = for infantry, 1 = for trees, 2 = general vehicles
 
  ArmorSet
    Armor           = TruckArmor
    DamageFX        = CrushableCarDamageFX
  End
  CommandSet = Infa_ChinaTroopCrawlerCommandSet

  ; *** AUDIO Parameters ***
  VoiceSelect = CombatCycleVoiceSelect
  VoiceMove = CombatCycleVoiceMove
  VoiceAttack = CombatCycleVoiceAttack
  VoiceGuard = CombatCycleVoiceMove


  UnitSpecificSounds
    ; These have the syntax of SomeNameSomewhereInCode = SomeNameSomewhereInLookupINIs
    VoiceCreate          = TechnicalVoiceCreate
    VoiceCrush      = CombatCycleVoiceMove
    VoiceEnter = CombatCycleVoiceMove
  End


  ; *** ENGINEERING Parameters ***  
  KindOf          = SELECTABLE CAN_ATTACK VEHICLE BOAT
  RadarPriority   = UNIT

  Body            = ActiveBody ModuleTag_02
    MaxHealth       = 420.0
    InitialHealth   = 420.0
  End

  Behavior              = TransportContain ModuleTag_40
    Slots               = 5
    AllowInsideKindOf   = INFANTRY VEHICLE
    DoorOpenTime        = 2000
    ScatterNearbyOnExit = Yes
  End

  Behavior = DestroyDie ModuleTag_03
    DeathTypes = ALL -CRUSHED -SPLATTED
  End
  Behavior = CrushDie ModuleTag_04
    DeathTypes = NONE +CRUSHED +SPLATTED
    ;TotalCrushSound     = CarAlarm
    ;BackEndCrushSound   = CarAlarm
    ;FrontEndCrushSound  = CarAlarm
    TotalCrushSoundPercent    = 50   
    BackEndCrushSoundPercent  = 50
    FrontEndCrushSoundPercent = 50
  End
  Behavior = SlowDeathBehavior ModuleTag_11
    DeathTypes = NONE +CRUSHED +SPLATTED
    SinkDelay = 14000
    SinkRate = 2     ; in Dist/Sec
    DestructionDelay = 20000
  End

  Behavior = FXListDie ModuleTag_05
    DeathTypes = NONE +CRUSHED +SPLATTED
    DeathFX = FX_CarCrush
  End
  Behavior = CreateObjectDie ModuleTag_06
    DeathTypes = ALL -CRUSHED -SPLATTED
    CreationList = OCL_GenericCarExplode
  End
  Behavior = FXListDie ModuleTag_07
    DeathTypes = ALL -CRUSHED -SPLATTED -FLOODED
    DeathFX = FX_GenericCarExplode
  End
  Behavior = CreateObjectDie ModuleTag_08
    DeathTypes = NONE +SUICIDED
    CreationList = OCL_BurnedCarHull
  End

  Behavior = AIUpdateInterface ModuleTag_09
   Turret
      TurretTurnRate = 180       ; turn rate, in degrees per sec
      NaturalTurretAngle = 0
      MinIdleScanAngle = 30      ; in degrees off the natural turret angle
      MaxIdleScanAngle = 60      ; in degrees off the natural turret angle
      MinIdleScanInterval = 5000 ; in milliseconds
      MaxIdleScanInterval = 10000 ; in milliseconds
      ControlledWeaponSlots = PRIMARY
    End
    AutoAcquireEnemiesWhenIdle = Yes
  End
  Locomotor = SET_NORMAL BasicBoatLocomotor

  Behavior = PhysicsBehavior ModuleTag_10
    Mass = 30.0
  End


  Behavior = FlammableUpdate ModuleTag_21
    AflameDuration = 5000         ; If I catch fire, I'll burn for this long...
    AflameDamageAmount = 5       ; taking this much damage...
    AflameDamageDelay = 500       ; this often.
  End

  Behavior = FloatUpdate UpdateTag_01
    Enabled = No ; 'no' because we dont want to be lifted by this update, just swayed around like a buoy
  End


  Geometry        = BOX
  GeometryIsSmall = Yes
  GeometryMajorRadius = 31.0
  GeometryMinorRadius = 12.0
  GeometryHeight  = 12.0
  Scale = 1.02
  Shadow          = SHADOW_VOLUME

End

;------------------------------------------------------------------------------
Object GLAVehicleForklift

  ; *** ART Parameters ***
  SelectPortrait         = SASmallForklift_L
  ButtonImage            = SASmallForklift

  Draw = W3DModelDraw ModuleTag_01

    DefaultConditionState
      Model = CVFKLT
      HideSubObject   = BOX
    End

    ConditionState = REALLYDAMAGED
      Model = CVFKLT
    End
    
    ConditionState = RUBBLE
      Model = CVFKLT
    End

    ConditionState    = CARRYING
      Model = CVFKLT
      ShowSubObject   = BOX
    End

    ConditionState    = REALLYDAMAGED CARRYING
      Model = CVFKLT
      ShowSubObject   = BOX
    End

    ConditionState    = RUBBLE CARRYING
      Model = CVFKLT
      ShowSubObject   = BOX
    End
   End


  ; ***DESIGN parameters ***
  DisplayName     = OBJECT:SmallForklift
  Side            = GLA
  EditorSorting   = VEHICLE
 
  TransportSlotCount  = 2                 ;how many "slots" we take in a transport (0 == not transportable)
  WeaponSet
    Conditions = None
    Weapon = PRIMARY None
  End
 
  ArmorSet
    Armor           = TruckArmor
    DamageFX        = CrushableCarDamageFX
  End
  BuildCost              = 350
  BuildTime              = 6.5          ;in seconds    
  VisionRange            = 150
  ShroudClearingRange = 200
  Prerequisites
    ;Object = GLASupplyStash
  End
  CrusherLevel           = 0  ;What can I crush?: 1 = infantry, 2 = trees, 3 = vehicles
  CrushableLevel         = 2  ;What am I?:        0 = for infantry, 1 = for trees, 2 = general vehicles
  CommandSet = ChinaSupplyTruckCommandSet

  ; *** AUDIO Parameters ***
  SoundMoveStart = CarMoveStart
  VoiceSelect = WorkerVoiceSelect
  VoiceMove = WorkerVoiceMove
  VoiceAttack = WorkerVoiceMove
  VoiceGuard = WorkerVoiceMove
  UnitSpecificSounds
    VoiceEnter        = WorkerVoiceMoveUpgraded
    VoiceEnterHostile = WorkerVoiceMoveUpgraded
    VoiceGarrison     = WorkerVoiceGarrison
    VoiceCreate       = WorkerVoiceCreate
    VoiceSupply       = WorkerVoiceSupply
    VoiceMoveUpgraded = WorkerVoiceMoveUpgraded
  End


  ; *** ENGINEERING Parameters ***  
  KindOf          = PRELOAD SELECTABLE CAN_CAST_REFLECTIONS VEHICLE HARVESTER SCORE
  RadarPriority   = UNIT

  Body            = ActiveBody ModuleTag_02
    MaxHealth       = 100.0
    InitialHealth   = 100.0
  End

  Behavior = DestroyDie ModuleTag_DeathTag03
    ;nothing
  End
  Behavior = CreateObjectDie ModuleTag_DeathTag04
    CreationList = OCL_GenericCarExplode
  End
  Behavior = FXListDie ModuleTag_DeathTag05
    DeathFX = FX_GenericCarExplode
  End

  Behavior = SupplyTruckAIUpdate ModuleTag_03
    MaxBoxes = 2
    SupplyCenterActionDelay = 500     ; ms for whole thing (one transaction)
    SupplyWarehouseActionDelay = 1000 ; ms per box (many small transactions)
    SupplyWarehouseScanDistance = 500 ;350 ; Max distance to look for a warehouse, or we go home.  (Direct dock command on warehouse overrides, and no max on Center Scan)
    SuppliesDepletedVoice = WorkerVoiceSuppliesDepleted
  End

  Locomotor = SET_NORMAL SupplyTruckLocomotor

  Behavior = PhysicsBehavior ModuleTag_07
    Mass = 30.0
  End

  Behavior = FlammableUpdate ModuleTag_08
    AflameDuration = 5000         ; If I catch fire, I'll burn for this long...
    AflameDamageAmount = 5       ; taking this much damage...
    AflameDamageDelay = 500       ; this often.
  End

  Geometry        = BOX
  GeometryIsSmall = Yes
  GeometryMajorRadius = 6.0
  GeometryMinorRadius = 2.0
  GeometryHeight  = 4.0
  Shadow          = SHADOW_VOLUME

End

;------------------------------------------------------------------------------
Object ChinaVehicleForklift

  ; *** ART Parameters ***
  SelectPortrait         = SALargeForklift_L
  ButtonImage            = SALargeForklift

  Draw = W3DModelDraw ModuleTag_01

    DefaultConditionState
      Model = CVCARGOBM
      HideSubObject   = BOX
    End

    ConditionState = REALLYDAMAGED
      Model = CVCARGOBM
    End
    
    ConditionState = RUBBLE
      Model = CVCARGOBM
    End

    ConditionState    = CARRYING
      Model = CVCARGOBM
      ShowSubObject   = BOX
    End

    ConditionState    = REALLYDAMAGED CARRYING
      Model = CVCARGOBM
      ShowSubObject   = BOX
    End

    ConditionState    = RUBBLE CARRYING
      Model = CVCARGOBM
      ShowSubObject   = BOX
    End
   End

  ; ***DESIGN parameters ***
  DisplayName     = OBJECT:LargeForklift
  Side            = China
  EditorSorting   = VEHICLE
 
  TransportSlotCount  = 3                 ;how many "slots" we take in a transport (0 == not transportable)
  WeaponSet
    Conditions = None
    Weapon = PRIMARY None
  End
 
  ArmorSet
    Armor           = TruckArmor
    DamageFX        = CrushableCarDamageFX
  End
  BuildCost              = 400
  BuildTime              = 10.5          ;in seconds    
  VisionRange            = 150
  ShroudClearingRange = 200
  Prerequisites
    ;Object = ChinaSupplyCenter
  End
  CrusherLevel           = 1  ;What can I crush?: 1 = infantry, 2 = trees, 3 = vehicles
  CrushableLevel         = 3  ;What am I?:        0 = for infantry, 1 = for trees, 2 = general vehicles
  CommandSet = ChinaSupplyTruckCommandSet

  ; *** AUDIO Parameters ***
  VoiceSelect             = SupplyTruckVoiceSelect
  VoiceMove               = SupplyTruckVoiceMove
  SoundMoveStart          = SupplyTruckMoveStart
  SoundMoveStartDamaged = SupplyTruckMoveStart

  UnitSpecificSounds
    VoiceCreate           = SupplyTruckVoiceCreate
    VoiceSupply           = SupplyTruckVoiceSupply
    VoiceCrush            = SupplyTruckVoiceCrush
    VoiceEnter            = SupplyTruckVoiceMove
  End

  ; *** ENGINEERING Parameters ***  
  KindOf          = PRELOAD SELECTABLE CAN_CAST_REFLECTIONS VEHICLE HARVESTER SCORE
  RadarPriority   = UNIT

  Body            = ActiveBody ModuleTag_02
    MaxHealth       = 140.0
    InitialHealth   = 140.0
  End

  Behavior = SupplyTruckAIUpdate ModuleTag_03
    MaxBoxes = 4
    SupplyCenterActionDelay = 500     ; ms for whole thing (one transaction)
    SupplyWarehouseActionDelay = 1000 ; ms per box (many small transactions)
    SupplyWarehouseScanDistance = 500 ;350 ; Max distance to look for a warehouse, or we go home.  (Direct dock command on warehouse overrides, and no max on Center Scan)
    SuppliesDepletedVoice = SupplyTruckVoiceSuppliesDepleted
  End

  Locomotor = SET_NORMAL SupplyTruckLocomotor

  Behavior = DestroyDie ModuleTag_DeathTag04
    ;nothing
  End
  Behavior = CreateObjectDie ModuleTag_DeathTag05
    CreationList = OCL_GenericCarExplode
  End
  Behavior = FXListDie ModuleTag_DeathTag06
    DeathFX = FX_GenericCarExplode
  End


;  Behavior = DestroyDie ModuleTag_07
;    DeathTypes = ALL -CRUSHED -SPLATTED
;  End
;  Behavior = CrushDie ModuleTag_08
;    DeathTypes = NONE +CRUSHED +SPLATTED
;    TotalCrushSound     = CarAlarm
;    BackEndCrushSound   = CarAlarm
;    FrontEndCrushSound  = CarAlarm
;    TotalCrushSoundPercent    = 50   
;    BackEndCrushSoundPercent  = 50
;    FrontEndCrushSoundPercent = 50
;  End
;  Behavior = SlowDeathBehavior ModuleTag_11
;    DeathTypes = NONE +CRUSHED +SPLATTED
;    SinkDelay = 14000
;    SinkRate = 2     ; in Dist/Sec
;    DestructionDelay = 20000
;  End

;  Behavior = FXListDie ModuleTag_09
;    DeathTypes = NONE +CRUSHED +SPLATTED
;    DeathFX = FX_CarCrush
;  End
;  Behavior = CreateObjectDie ModuleTag_10
;    DeathTypes = ALL -CRUSHED -SPLATTED
;    CreationList = OCL_GenericCarExplode
;  End
;  Behavior = FXListDie ModuleTag_11
;    DeathTypes = ALL -CRUSHED -SPLATTED -FLOODED
;    DeathFX = FX_GenericCarExplode
;  End
;  Behavior = CreateObjectDie ModuleTag_12
;    DeathTypes = NONE +SUICIDED
;    CreationList = OCL_BurnedCarHull
;  End

;  Behavior = AIUpdateInterface ModuleTag_13
;  End
;  Locomotor = SET_NORMAL BasicCarLocomotor
;  Locomotor = SET_WANDER WanderCarLocomotor
;  Locomotor = SET_PANIC PanicCarLocomotor

  Behavior = PhysicsBehavior ModuleTag_14
    Mass = 30.0
  End

  Behavior = FlammableUpdate ModuleTag_15
    AflameDuration = 5000         ; If I catch fire, I'll burn for this long...
    AflameDamageAmount = 5       ; taking this much damage...
    AflameDamageDelay = 500       ; this often.
  End

  Geometry        = BOX
  GeometryIsSmall = Yes
  GeometryMajorRadius = 17.0
  GeometryMinorRadius = 5.0
  GeometryHeight  = 7.0
  Shadow          = SHADOW_VOLUME

End

;------------------------------------------------------------------------------
Object GLAVehicleNukeSSMLauncher

  ; *** ART Parameters ***
  SelectPortrait         = SUScudLauncher_L
  ButtonImage            = SUScudLauncher

  UpgradeCameo1 = Upgrade_GLAJunkRepair
  UpgradeCameo2 = Upgrade_ChinaUraniumShells
  ;UpgradeCameo3 = NONE
  ;UpgradeCameo4 = NONE
  ;UpgradeCameo5 = NONE

  Draw = W3DTruckDraw ModuleTag_01
    OkToChangeModelColor = Yes

    ProjectileBoneFeedbackEnabledSlots = PRIMARY SECONDARY ; WeaponLaunchBone will be shown/hidden, not just used for firing offset
  
    DefaultConditionState
      Model = UVScudLchr
      Turret = TURRETUP02
      TurretPitch = TURRETEL02
      ShowSubObject = TURRETUP02
      HideSubObject = TURRET TURRETUP01
      WeaponLaunchBone = PRIMARY WeaponC
      WeaponLaunchBone = SECONDARY WeaponC
    End

    ConditionState = REALLYDAMAGED
      Model = UVScudLchr_d
      Turret = TURRETUP02
      TurretPitch = TURRETEL02
      ShowSubObject = TURRETUP02
      HideSubObject = TURRET TURRETUP01
      WeaponLaunchBone = PRIMARY WeaponC
      WeaponLaunchBone = SECONDARY WeaponC
    End
    AliasConditionState = RUBBLE

    TrackMarks = EXTireTrack.tga

    Dust = ScudLauncherDust
    DirtSpray = RocketBuggyDirtSpray
    PowerslideSpray = RocketBuggyDirtPowerSlide

    ; These parameters are only used if the model has a separate suspension, 
    ; and the locomotor has HasSuspension = Yes.
    LeftFrontTireBone = Tire01
    RightFrontTireBone = Tire05
    LeftRearTireBone = Tire04
    RightRearTireBone = Tire08
    MidLeftFrontTireBone = Tire02
    MidRightFrontTireBone = Tire06
    MidLeftRearTireBone = Tire03
    MidRightRearTireBone = Tire07

    TireRotationMultiplier = 0.2   ; this * speed = rotation.
    ;PowerslideRotationAddition = 0.0   ; This speed is added to the rotation speed when powersliding.

  End


  ; ***DESIGN parameters ***

  DisplayName      = OBJECT:SSMLauncher
  Side = GLA
  EditorSorting   = VEHICLE
  TransportSlotCount = 4                 ;how many "slots" we take in a transport (0 == not transportable)

  WeaponSet
    Conditions = None
    Weapon = PRIMARY NukeSurfaceToSurfaceMissileWeapon
  End

  ArmorSet
    Conditions      = None
    Armor           = TruckArmor
    DamageFX        = TankDamageFX
  End
  BuildCost       = 2400
  BuildTime       = 35.0          ;in seconds    
  VisionRange     = 280
  ShroudClearingRange = 360
  Prerequisites
    Object = GLAArmsDealer
    Object = GLAPalace
    Science = SCIENCE_ScudLauncher
  End

  ExperienceValue = 50 50 100 150   ;Experience point value at each level
  ExperienceRequired = 0 100 200 400  ;Experience points needed to gain each level
  IsTrainable = Yes             ;Can gain experience
  CrusherLevel           = 2  ;What can I crush?: 1 = infantry, 2 = trees, 3 = vehicles
  CrushableLevel         = 2  ;What am I?:        0 = for infantry, 1 = for trees, 2 = general vehicles
  CommandSet           = GenericCommandSet

  ; *** AUDIO Parameters ***
  VoiceSelect = ScudLauncherVoiceSelect
  VoiceMove = ScudLauncherVoiceMove
  VoiceGuard = ScudLauncherVoiceMove
  VoiceAttack = ScudLauncherVoiceAttack
  SoundMoveStart = ScudLauncherMoveStart
  SoundMoveStartDamaged = ScudLauncherMoveStart
  UnitSpecificSounds
    ; These have the syntax of SomeNameSomewhereInCode = SomeNameSomewhereInLookupINIs
    VoiceCreate       = ScudLauncherVoiceCreate
    TurretMoveStart = NoSound
    TurretMoveLoop = OverlordTankTurretMoveLoop
    TruckLandingSound = NoSound
    TruckPowerslideSound = NoSound
    VoiceCrush = ScudLauncherVoiceCrush
    VoiceEnter = ScudLauncherVoiceMove
    VoicePrimaryWeaponMode = ScudLauncherVoiceModeHiEx
    VoiceSecondaryWeaponMode = ScudLauncherVoiceModeAnthrax
  End

  ; *** ENGINEERING Parameters ***
  RadarPriority = UNIT
  KindOf = PRELOAD SELECTABLE CAN_ATTACK DONT_AUTO_CRUSH_INFANTRY CAN_CAST_REFLECTIONS VEHICLE SALVAGER WEAPON_SALVAGER SCORE

  Body = ActiveBody ModuleTag_02
    MaxHealth       = 400.0
    InitialHealth   = 400.0

    ; Subdual damage "Subdues" you (reaction defined by BodyModule) when it passes your max health.
    ; The cap limits how extra-subdued you can be, and the other numbers detemine how fast it drains away on its own.
    SubdualDamageCap = 360
    SubdualDamageHealRate = 500
    SubdualDamageHealAmount = 50
  End

  Behavior = AIUpdateInterface ModuleTag_03
    Turret
      TurretTurnRate = 40   ; turn rate, in degrees per sec
      TurretPitchRate = 40
      FirePitch = 90  ; Instead of aiming pitchwise at the target, it will aim here
      AllowsPitch = Yes
      ControlledWeaponSlots = PRIMARY
    End
    AutoAcquireEnemiesWhenIdle = No NotWhileAttacking
  End  

  Behavior = CommandButtonHuntUpdate  ModuleTag_04 ; allows use of command button hunt script with this unit. 
  End

  Locomotor = SET_NORMAL ScudLauncherLocomotor
  Behavior = PhysicsBehavior ModuleTag_05
    Mass = 50.0
  End

  Behavior = AutoHealBehavior ModuleTag_06
    HealingAmount = 2
    HealingDelay = 1000 ; msec
    TriggeredBy = Upgrade_GLAJunkRepair
  End

  Behavior = TransitionDamageFX ModuleTag_08
    ReallyDamagedParticleSystem1 = Bone:Smoke RandomBone:Yes PSys:SmokeSmallContinuous01
    ReallyDamagedFXList1 = Loc: X:0 Y:0 Z:0 FXList:FX_ScudLauncherDamageTransition
  End

  Behavior = FireWeaponWhenDeadBehavior ModuleTag_60
    DeathWeapon   = NuclearTankDeathWeapon
    StartsActive  = Yes
    TriggeredBy   = Upgrade_ChinaUraniumShells
  End

  ; Catch fire, and explode death
  Behavior = SlowDeathBehavior ModuleTag_09
    DeathTypes = ALL -CRUSHED -SPLATTED
    ProbabilityModifier = 50
    DestructionDelay = 2000
    DestructionDelayVariance = 300
    FX  = INITIAL  FX_CrusaderCatchFire
    FX  = MIDPOINT FX_ChinaVehicleNukeCannonDeathExplosion
    OCL = FINAL    OCL_SCUDLauncherDeathEffect  
    FX  = FINAL    FX_ScudLauncherExplosionOneFinal
  End

  ; A crushing defeat
  Behavior = FXListDie ModuleTag_10
    DeathTypes = NONE +CRUSHED +SPLATTED
    DeathFX = FX_CarCrush
  End

  Behavior = CreateObjectDie ModuleTag_11
    DeathTypes = NONE +CRUSHED +SPLATTED
    CreationList = OCL_CrusaderTank_CrushEffect
  End

  Behavior = FlammableUpdate ModuleTag_21
    AflameDuration = 5000         ; If I catch fire, I'll burn for this long...
    AflameDamageAmount = 3       ; taking this much damage...
    AflameDamageDelay = 500       ; this often.
  End

  Behavior = DestroyDie ModuleTag_22
    DeathTypes = NONE +CRUSHED +SPLATTED
  End

  Behavior = WeaponSetUpgrade ModuleTag_23
    TriggeredBy = Upgrade_GLAAnthraxBeta
  End

  Behavior = LockWeaponCreate ModuleTag_24
    SlotToLock = PRIMARY ; Prevents indeterminate state plus two unpickable weapons equaling no attack.
  End

  Geometry = BOX
  GeometryMajorRadius = 14.0
  GeometryMinorRadius = 7.0
  GeometryHeight = 11.5     
  GeometryIsSmall = No
  Scale = 1.08
  Shadow = SHADOW_VOLUME   
  ShadowSizeX = 45  ; minimum elevation angle above horizon. Used to limit shadow length 

End

;------------------------------------------------------------------------------
;------------------------------------------------------------------------------
Object M198Cannon ;when deployed with its crew manning the gun 

;**** ART Parameters **************************
  SelectPortrait         = SAFirebase_L
  ButtonImage            = SAFirebase
  
  ;UpgradeCameo1 = NONE
  ;UpgradeCameo2 = NONE
  ;UpgradeCameo3 = NONE
  ;UpgradeCameo4 = NONE
  ;UpgradeCameo5 = NONE
  
  Draw = W3DTruckDraw ModuleTag_01
    DefaultConditionState
      Model = M198
      WeaponMuzzleFlash  = PRIMARY MuzzleFX
      WeaponRecoilBone   = PRIMARY Barrel
      Turret            = TURRET01
      TurretPitch       = TURRETEL
      WeaponLaunchBone  = PRIMARY   MUZZLE01
      WeaponFireFXBone  = PRIMARY   MUZZLEFX
    End

    ConditionState = REALLYDAMAGED
      Model = M198D
      WeaponMuzzleFlash  = PRIMARY MuzzleFX
      WeaponRecoilBone   = PRIMARY Barrel
      Turret            = TURRET01
      TurretPitch       = TURRETEL
      WeaponLaunchBone  = PRIMARY   MUZZLE01
      WeaponFireFXBone  = PRIMARY   MUZZLEFX
    End
    AliasConditionState = RUBBLE

    TireRotationMultiplier = 0.2   ; this * speed = rotation.
    ;PowerslideRotationAddition = 0.0   ; This speed is added to the rotation speed when powersliding.

  End

  ; ***DESIGN parameters ***

  DisplayName      = OBJECT:ArtilleryCannon
  Side = Civilian
  EditorSorting = VEHICLE
  TransportSlotCount = 0 ;how many "slots" we take in a transport (0 == not transportable) ;not needed for this because it is a trailer! 

  WeaponSet
    Conditions = None
    Weapon = PRIMARY StrategyCenterGun
  End

  ArmorSet
    Conditions      = None
    Armor           = TruckArmor
    DamageFX        = TankDamageFX
  End
  BuildCost       = 750
  BuildTime       = 15.0          ;in seconds    
  VisionRange     = 150
  ShroudClearingRange = 200
  Prerequisites
    ;Object =
    ;Object =
    ;Science =
  End

  ExperienceValue = 50 50 100 150   ;Experience point value at each level
  ExperienceRequired = 0 100 200 400  ;Experience points needed to gain each level
  IsTrainable = Yes             ;Can gain experience
  CrusherLevel           = 0  ;What can I crush?: 1 = infantry, 2 = trees, 3 = vehicles
  CrushableLevel         = 2  ;What am I?:        0 = for infantry, 1 = for trees, 2 = general vehicles
  CommandSet           = GenericCommandSet

  ; *** AUDIO Parameters ***
  ;VoiceSelect =
  ;VoiceMove =
  ;VoiceGuard =
  ;VoiceAttack =
  ;SoundMoveStart =
  ;SoundMoveStartDamaged =
  UnitSpecificSounds
    ; These have the syntax of SomeNameSomewhereInCode = SomeNameSomewhereInLookupINIs
    ;VoiceCreate =
    TurretMoveStart = NoSound
    TurretMoveLoop = NukeCannonTurretMoveLoop
    TruckLandingSound = NoSound
    TruckPowerslideSound = NoSound
    ;VoiceCrush =
    ;VoiceEnter =
  End

  ; *** ENGINEERING Parameters ***
  RadarPriority = UNIT
  KindOf = PRELOAD SELECTABLE CAN_ATTACK DONT_AUTO_CRUSH_INFANTRY MOB_NEXUS ATTACK_NEEDS_LINE_OF_SIGHT CAN_CAST_REFLECTIONS INFANTRY VEHICLE SCORE

  Body = ActiveBody ModuleTag_02
    MaxHealth       = 400.0
    InitialHealth   = 400.0

    ; Subdual damage "Subdues" you (reaction defined by BodyModule) when it passes your max health.
    ; The cap limits how extra-subdued you can be, and the other numbers detemine how fast it drains away on its own.
    SubdualDamageCap = 360
    SubdualDamageHealRate = 500
    SubdualDamageHealAmount = 50
  End

  Behavior = AIUpdateInterface ModuleTag_03
    Turret
      TurretTurnRate = 40   ; turn rate, in degrees per sec
      TurretPitchRate = 40
      FirePitch = 90  ; Instead of aiming pitchwise at the target, it will aim here
      AllowsPitch = Yes
      ControlledWeaponSlots = PRIMARY
    End
    AutoAcquireEnemiesWhenIdle = No NotWhileAttacking
  End  

  Behavior = CommandButtonHuntUpdate  ModuleTag_04 ; allows use of command button hunt script with this unit. 
  End

  Locomotor = SET_NORMAL M198CannonLocomotor
  Behavior = PhysicsBehavior ModuleTag_05
    Mass = 50.0
  End

  ;Behavior = AutoHealBehavior ModuleTag_06
    ;HealingAmount = 2
    ;HealingDelay = 1000 ; msec
    ;TriggeredBy = Upgrade_GLAJunkRepair
  ;End

  Behavior = TransitionDamageFX ModuleTag_07
    ReallyDamagedParticleSystem1 = Bone:Smoke RandomBone:Yes PSys:SmokeSmallContinuous01
    ReallyDamagedFXList1 = Loc: X:0 Y:0 Z:0 FXList:FX_ScudLauncherDamageTransition
  End

  ; Catch fire, and explode death
  Behavior = SlowDeathBehavior ModuleTag_08
    DeathTypes = ALL -CRUSHED -SPLATTED
    ProbabilityModifier = 42
    DestructionDelay = 2000
    DestructionDelayVariance = 300
    FX  = INITIAL  FX_CrusaderCatchFire
    FX  = FINAL  FX_StationaryCannonDeathEffect
  End

  ; A crushing defeat
  Behavior = FXListDie ModuleTag_09
    DeathTypes = NONE +CRUSHED +SPLATTED
    DeathFX = FX_CarCrush
  End

  ; Just explode death
  Behavior = SlowDeathBehavior ModuleTag_10
    ProbabilityModifier = 29
    DestructionDelay = 200
    DestructionDelayVariance = 100
    FX  = FINAL  FX_StationaryCannonDeathEffect
  End
  Behavior = CreateCrateDie ModuleTag_11
    CrateData = SalvageCrateData
    ;CrateData = EliteTankCrateData
    ;CrateData = HeroicTankCrateData
  End

  Behavior = FlammableUpdate ModuleTag_12
    AflameDuration = 5000         ; If I catch fire, I'll burn for this long...
    AflameDamageAmount = 3       ; taking this much damage...
    AflameDamageDelay = 500       ; this often.
  End

  Behavior = DestroyDie ModuleTag_13
    DeathTypes = ALL
  End

  ;Behavior = LockWeaponCreate ModuleTag_14
    ;SlotToLock = PRIMARY ; Prevents indeterminate state plus two unpickable weapons equaling no attack.
  ;End

  Behavior            = SpawnBehavior ModuleTag_15
    SpawnNumber       = 4
    SpawnReplaceDelay = 30000 ; 30 seconds

        SpawnTemplateName = AmericaInfantryPilot
        SpawnTemplateName = AmericaInfantryRanger
        SpawnTemplateName = ChinaInfantryRedguard
        SpawnTemplateName = ChinaInfantryCO

    ExitByBudding = Yes;!

    InitialBurst = 4 ; the first set of 4 will not delay
    OneShot     = No
    AggregateHealth = Yes
    SlavesHaveFreeWill = No
  End

  Behavior = QueueProductionExitUpdate ModuleTag_16
    UnitCreatePoint   = X:  0.0  Y:  0.0   Z:0.0
    NaturalRallyPoint = X: 0.0  Y:  0.0   Z:0.0
    ExitDelay     = 5000 ; 5 sec
    InitialBurst = 4 ; the first set of 4 will not delay
  End

  Geometry = CYLINDER
  GeometryMajorRadius = 1.5
  GeometryMinorRadius = 1.5
  GeometryHeight = 1.5
  Scale = 1.0    
  GeometryIsSmall = Yes 
  Shadow = SHADOW_VOLUME   
  ShadowSizeX = 45  ; minimum elevation angle above horizon. Used to limit shadow length

End

;------------------------------------------------------------------------------
;------------------------------------------------------------------------------
Object ChinaInfantryTankCrew 

;**** ART Parameters **************************
  SelectPortrait         = SATankCrew
  ButtonImage            = SATankCrew
  
  UpgradeCameo1 = Upgrade_Nationalism
  UpgradeCameo2 = Upgrade_ChinaRifleUpgrade
  ;UpgradeCameo3 = NONE
  ;UpgradeCameo4 = NONE
  ;UpgradeCameo5 = NONE
  
  Draw = W3DModelDraw ModuleTag_01
    OkToChangeModelColor = Yes
    DefaultConditionState
      Model = None
    End
  End


;****DESIGN parameters **************************

  DisplayName      = OBJECT:TankCrew
  Side = China

  RadarPriority       = NOT_ON_RADAR

  EditorSorting   = INFANTRY
  TransportSlotCount = 0                 ;how many "slots" we take in a transport (0 == not transportable)

  WeaponSet
    Conditions = None 
    Weapon = PRIMARY GLAAngryMobNexusHarmlessWeapon
    Weapon = SECONDARY GLAAngryMobNexusHarmlessWeapon
    Weapon = TERTIARY GLAAngryMobNexusHarmlessWeapon
  End


  ArmorSet
    Conditions      = None
    Armor           = HumanArmor
    DamageFX        = InfantryDamageFX
  End

  BuildCost       = 1500
  BuildTime       = 35.0          ;in seconds    
  VisionRange     = 150  ; it can scout for the spawn
  ShroudClearingRange = 150

  Prerequisites
    ;Object =
    ;Object =
  End

  ExperienceValue    = 5 5 5 5 ;Experience point value at each level

  IsTrainable     = Yes



  CommandSet    = GenericCommandSet

;**** AUDIO Parameters *****************************
  VoiceSelect = RedGuardVoiceMove
  VoiceMove = RedGuardVoiceMove
  VoiceGuard = RedGuardVoiceAttack
  VoiceAttack = RedGuardVoiceAttack
  UnitSpecificSounds
    VoiceCreate = RedGuardVoiceCreate
  End


;**** ENGINEERING Parameters ******************************

  RadarPriority = UNIT
  KindOf = PRELOAD CAN_ATTACK INFANTRY ATTACK_NEEDS_LINE_OF_SIGHT IGNORES_SELECT_ALL SELECTABLE SCORE ;IGNORED_IN_GUI MOB_NEXUS
  Body = ActiveBody BodyTag_01
    MaxHealth       = 300.0
    InitialHealth   = 300.0
  End

  Behavior = AIUpdateInterface ModuleTag_03
    AutoAcquireEnemiesWhenIdle = Yes
  End

  Locomotor = SET_NORMAL AngryMobNexusLocomotor ;Important! don't make the Nexus any faster!
  Locomotor = SET_WANDER AngryMobNexusLocomotor ;Important! don't make the Nexus any faster!
  Locomotor = SET_PANIC AngryMobNexusLocomotor ;Important! don't make the Nexus any faster!

  Behavior = PhysicsBehavior ModuleTag_04
    Mass = 50.0
  End

  Behavior            = SpawnBehavior ModuleTag_05
    SpawnNumber       = 4
    ;SpawnReplaceDelay = 300000;

        SpawnTemplateName = ChinaInfantryTankCommander
        SpawnTemplateName = ChinaInfantryTankCrewman
        SpawnTemplateName = ChinaInfantryTankCrewman
        SpawnTemplateName = ChinaInfantryTankCrewman

    ExitByBudding = Yes;!

    InitialBurst = 4 ; the first set of 4 will not delay
    OneShot     = Yes
    AggregateHealth = Yes
    SlavesHaveFreeWill = No
  End

  Behavior = QueueProductionExitUpdate ModuleTag_06
    UnitCreatePoint   = X:  0.0  Y:  0.0   Z:0.0
    NaturalRallyPoint = X: 0.0  Y:  0.0   Z:0.0
    ExitDelay     = 5000 ; 5 sec
    InitialBurst = 4 ; the first set of 4 will not delay
  End

  Behavior = DestroyDie ModuleTag_07
    DeathTypes = ALL
  End

  ;Behavior = VeterancyCrateCollide       ModuleTag_08
    ;RequiredKindOf = VEHICLE      ; we only give our bonus to VEHICLEs we collide with
    ;ForbiddenKindOf = DOZER       ; but not to TRANSPORTs or DOZERs!
    ;EffectRange = 0               ; 0=="affect only the thing you collide with"
    ;AddsOwnerVeterancy = Yes      ; we add our own veterancy to the target (rather than just +1 level)
    ;IsPilot = Yes                 ; set the pilot flag because it's different than the veterancy crate and has extra checking
  ;End

  ;Behavior = AutoFindHealingUpdate   ModuleTag_09 ; This update will have the unit go to a healing station if injured. jba 
    ;ScanRate = 1000 ; once a second.
    ;ScanRange = 700 ;
    ;NeverHeal = 0.90 ;  don't heal if we are > 90% healthy.
    ;AlwaysHeal = 0.40 ; if we get below 40%, find healing right away.
  ;End

  ;Behavior = PilotFindVehicleUpdate   ModuleTag_10 ; This update will have the unit go to a vehicle. jba 
    ;ScanRate = 1000 ; once a second.
    ;ScanRange = 700 ;
    ;MinHealth = 0.5 ;  don't enter a vehicle less than 50% healthy.
  ;End

  ;Behavior = VeterancyGainCreate ModuleTag_11
    ;StartingLevel = VETERAN
  ;End

  Geometry = CYLINDER
  GeometryMajorRadius = 1.0
  GeometryMinorRadius = 1.0
  GeometryHeight = 1.0
  Scale = 0.88    
  GeometryIsSmall = Yes 
  Shadow = SHADOW_VOLUME

End

;------------------------------------------------------------------------------
;------------------------------------------------------------------------------
Object ChinaInfantryTankCommander

;**** ART Parameters ***
  SelectPortrait         = SATankCrew
  ButtonImage            = SATankCrew

  Draw = W3DModelDraw DrawTag_01

    OkToChangeModelColor = Yes

    ;NORMAL STANDING
    DefaultConditionState
      Model = NIOFCR_SKN
      IdleAnimation = NIOFCR_SKL.NIOFCR_STA 0 21
      ;Regular spice animations
      IdleAnimation = NIOFCR_SKL.NIOFCR_IDA
      IdleAnimation = NIOFCR_SKL.NIOFCR_IDB
      AnimationMode = ONCE
      WeaponFireFXBone = PRIMARY Muzzle
      WeaponMuzzleFlash = PRIMARY MuzzleFX
      TransitionKey = TRANS_STAND
    End

    ConditionState    = MOVING
      Animation       = NIOFCR_SKL.NIOFCR_RNA
      AnimationMode   = LOOP
      ParticleSysBone     = None InfantryDustTrails
    End

    ; NORMAL ATTACK
    ;--------------------------------------------------------
    ; Drawing gun
    ConditionState  = PREATTACK_A
      Animation     = NIOFCR_SKL.NIOFCR_ATAST
      AnimationMode = ONCE
    End
    AliasConditionState = PREATTACK_A MOVING
    AliasConditionState = PREATTACK_A FIRING_A
    AliasConditionState = PREATTACK_A BETWEEN_FIRING_SHOTS_A

    ; Firing gun
    ConditionState  = FIRING_A
      Animation     = NIOFCR_SKL.NIOFCR_ATALP
      AnimationMode = LOOP
      TransitionKey = TRANS_FIRING_A
    End
    ConditionState  = BETWEEN_FIRING_SHOTS_A
      Animation     = NIOFCR_SKL.NIOFCR_ATALP
      AnimationMode = LOOP
      TransitionKey = TRANS_FIRING_A
    End
    AliasConditionState = RELOADING_A
    AliasConditionState = MOVING FIRING_A
    AliasConditionState = MOVING BETWEEN_FIRING_SHOTS_A
    AliasConditionState = MOVING RELOADING_A

    ; This transition allows him to put his gun away when he's finished attacking.
    TransitionState = TRANS_FIRING_A TRANS_STAND
      Animation     = NIOFCR_SKL.NIOFCR_ATAED
      AnimationMode = ONCE
    End
    ;--------------------------------------------------------

    ConditionState  = DYING
      Animation     = NIOFCR_SKL.NIOFCR_DTA
      Animation     = NIOFCR_SKL.NIOFCR_DTB
      AnimationMode = ONCE
      TransitionKey = TRANS_Dying
    End

    TransitionState = TRANS_Dying TRANS_Flailing
      Animation = NIOFCR_SKL.NIOFCR_ADTE1
      AnimationMode = ONCE
    End

    ConditionState = DYING EXPLODED_FLAILING
      Animation = NIOFCR_SKL.NIOFCR_ADTE2
      AnimationMode = LOOP
      TransitionKey = TRANS_Flailing
    End

    ConditionState = DYING EXPLODED_BOUNCING
      Animation = NIOFCR_SKL.NIOFCR_ADTE3
      AnimationMode = ONCE
      TransitionKey = None
    End

    ConditionState  = SPECIAL_CHEERING
      Animation     = NIOFCR_SKL.NIOFCR_CHA
      AnimationMode = LOOP
    End

    ;PARACHUTING ANIMATIONS

    ;@TODO - MISSING ANIMATION FILE
    ;ConditionState   = FREEFALL
    ;  Animation      = AIOFCR_SKL.AIOFCR_PFL
    ;  AnimationMode  = LOOP
    ;  TransitionKey  = TRANS_Falling
    ;End
    ;AliasConditionState = FREEFALL REALLYDAMAGED
    ;AliasConditionState = FREEFALL DYING
    ConditionState  = PARACHUTING
      Animation     = AIOFCR_SKL.AIOFCR_PHG
      AnimationMode = LOOP
      Flags         = PRISTINE_BONE_POS_IN_FINAL_FRAME  ; our bone positions should come from the last frame, rather than the first
      TransitionKey = TRANS_Chute

    End
    AliasConditionState = PARACHUTING REALLYDAMAGED
    AliasConditionState = PARACHUTING DYING
    TransitionState = TRANS_Falling TRANS_Chute
      Animation     = AIOFCR_SKL.AIOFCR_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     = AIOFCR_SKL.AIOFCR_PTD
      AnimationMode = ONCE
    End

  End

;**** DESIGN parameters ***

  DisplayName      = OBJECT:TankCrew
  Side = China
  EditorSorting = INFANTRY
  TransportSlotCount = 1                 ;how many "slots" we take in a transport (0 == not transportable)

  WeaponSet
    Conditions = None 
    Weapon = PRIMARY GLAAngryMobPistolWeapon
  End

  ArmorSet
    Conditions      = None
    Armor           = HumanArmor
    DamageFX        = InfantryDamageFX
  End

  VisionRange = 150
  ShroudClearingRange = 150
  Prerequisites
    ;Object =
  End
  BuildCost = 100
  BuildTime = 1.0           

  ExperienceValue = 5 5 5 5    ;Experience point value at each level
  ExperienceRequired = 0 150 450 900  ;Experience points needed to gain each level
  IsTrainable = No             ;Can gain experience
  CrushableLevel         = 0  ;What am I?:        0 = for infantry, 1 = for trees, 2 = general vehicles

  CommandSet    = GenericCommandSet

;**** AUDIO Parameters *****************************
  ;VoiceSelect = RedGuardVoiceMove
  ;VoiceMove = RedGuardVoiceMove
  ;VoiceGuard = RedGuardVoiceAttack
  ;VoiceAttack = RedGuardVoiceAttack
  ;UnitSpecificSounds
    ;VoiceCreate = RedGuardVoiceCreate
  ;End

;**** ENGINEERING Parameters *** ;CREW01
  RadarPriority = UNIT
  KindOf = PRELOAD SELECTABLE CAN_ATTACK ATTACK_NEEDS_LINE_OF_SIGHT CAN_CAST_REFLECTIONS INFANTRY SALVAGER ;IGNORED_IN_GUI

  Body = ActiveBody BodyTag_01
    MaxHealth       = 100.0
    InitialHealth   = 100.0
  End

  Behavior = AIUpdateInterface ModuleTag_03
    AutoAcquireEnemiesWhenIdle = Yes
  End

  Behavior = MobMemberSlavedUpdate ModuleTag_04
    MustCatchUpRadius   = 10
    NoNeedToCatchUpRadius = 5
    Squirrelliness = 0.02
    CatchUpCrisisBailTime = 30; this is in calls to this update, not in frames
  End

  Locomotor = SET_NORMAL AngryMobNormalLocomotor
  Locomotor = SET_WANDER AngryMobWanderLocomotor
  Locomotor = SET_PANIC AngryMobPanicLocomotor

  Behavior = PhysicsBehavior BehaviorTag_01
    Mass = 5.0
  End

  Behavior = SquishCollide ModuleTag_05
    ;nothing
  End


; --- begin Death modules ---
  Behavior = SlowDeathBehavior ModuleTag_Death01
    DeathTypes          = ALL -CRUSHED -SPLATTED -EXPLODED -BURNED -POISONED -POISONED_BETA -POISONED_GAMMA -LASERED
    SinkDelay           = 3000
    SinkRate            = 0.5     ; in Dist/Sec
    DestructionDelay    = 8000
    FX                  = INITIAL FX_RedGuardDie
    FX                  = INITIAL FX_BloodyPuddle3
  End
  Behavior = SlowDeathBehavior ModuleTag_Death02
    DeathTypes          = NONE +CRUSHED +SPLATTED
    SinkDelay           = 3000
    SinkRate            = 0.5     ; in Dist/Sec
    DestructionDelay    = 8000
    FX                  = INITIAL FX_GIDieCrushed
    FX                  = INITIAL FX_BloodyPuddle3
  End
  Behavior = SlowDeathBehavior ModuleTag_Death03
    DeathTypes          = NONE +EXPLODED
    SinkDelay           = 3000
    SinkRate            = 0.5     ; in Dist/Sec
    DestructionDelay    = 8000
    FX                  = INITIAL FX_RedGuardDie
    FX                  = INITIAL FX_BloodyPuddle3
    FlingForce          = 8
    FlingForceVariance  = 3
    FlingPitch          = 60
    FlingPitchVariance  = 10
  End
  Behavior = SlowDeathBehavior ModuleTag_Death04
    DeathTypes          = NONE +BURNED
    DestructionDelay    = 0
    FX                  = INITIAL FX_DieByFireChina
    OCL                 = INITIAL OCL_FlamingInfantry
  End
  Behavior = SlowDeathBehavior ModuleTag_Death05
    DeathTypes          = NONE +POISONED
    DestructionDelay    = 0
    FX                  = INITIAL FX_DieByToxinChina
    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_DieByToxinChina
    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_DieByToxinChina
    OCL                 = INITIAL OCL_ToxicInfantryGamma
  End
; --- end Death modules ---

  Behavior = HordeUpdate ModuleTag_06
    RubOffRadius = 60    ; if I am this close to a real hordesman, I will get to be an honorary hordesman
    UpdateRate = 1000    ; how often to recheck horde status (msec)
    Radius = 30          ; how close other units must be to us to count towards our horde-ness (~30 feet or so)
    KindOf = INFANTRY    ; what KindOf's must match to count towards horde-ness
    AlliesOnly = Yes     ; do we only count allies towards horde status? 
    ExactMatch = No      ; do we only count units of our exact same type towards horde status? (overrides kindof)
    Count = 2            ; how many units must be within Radius to grant us horde-ness
    Action = HORDE       ; when horde-ing, grant us the HORDE bonus
  End

  Behavior = PoisonedBehavior BehaviorTag_07
    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

  Behavior = VeterancyCrateCollide       ModuleTag_08
    RequiredKindOf = VEHICLE      ; we only give our bonus to VEHICLEs we collide with
    ForbiddenKindOf = DOZER       ; but not to TRANSPORTs or DOZERs!
    EffectRange = 0               ; 0=="affect only the thing you collide with"
    AddsOwnerVeterancy = Yes      ; we add our own veterancy to the target (rather than just +1 level)
    IsPilot = Yes                 ; set the pilot flag because it's different than the veterancy crate and has extra checking
  End

  Behavior = AutoFindHealingUpdate   ModuleTag_09 ; This update will have the unit go to a healing station if injured. jba 
    ScanRate = 1000 ; once a second.
    ScanRange = 700 ;
    NeverHeal = 0.90 ;  don't heal if we are > 90% healthy.
    AlwaysHeal = 0.40 ; if we get below 40%, find healing right away.
  End

  Behavior = PilotFindVehicleUpdate   ModuleTag_10 ; This update will have the unit go to a vehicle. jba 
    ScanRate = 1000 ; once a second.
    ScanRange = 700 ;
    MinHealth = 0.5 ;  don't enter a vehicle less than 50% healthy.
  End

  Behavior = VeterancyGainCreate ModuleTag_11
    StartingLevel = VETERAN
  End
 
  Geometry = CYLINDER
  GeometryMajorRadius = 4.0 ; very thin
  GeometryHeight = 12.0
  GeometryIsSmall = Yes
  Shadow = SHADOW_DECAL
  ShadowSizeX = 14;
  ShadowSizeY = 14;
  Scale = 0.88
  ShadowTexture = ShadowI;
  BuildCompletion = APPEARS_AT_RALLY_POINT

End

;------------------------------------------------------------------------------
;------------------------------------------------------------------------------
Object ChinaInfantryTankCrewman

;**** ART Parameters ***
  SelectPortrait         = SATankCrew
  ButtonImage            = SATankCrew

  Draw = W3DModelDraw DrawTag_01
    OkToChangeModelColor = Yes


    ; this says "we don't use these condition states at all, so completely
    ; ignore them for purposes of matchmaking"... this is useful to help
    ; reduce the number of AliasConditionState clauses you must add in
    ; order to avoid ambiguity in some cases.
    IgnoreConditionStates = PREATTACK_A FIRING_A BETWEEN_FIRING_SHOTS_A RELOADING_A

    ; ------- Standing-Around Animations
 
    DefaultConditionState
      Model               = NICNSC_SKN
      IdleAnimation       = NICNSC_SKL.NICNSC_STA 0 35
      IdleAnimation       = NICNSC_SKL.NICNSC_IDA
      IdleAnimation       = NICNSC_SKL.NICNSC_IDB
      AnimationMode       = ONCE
      WeaponFireFXBone    = PRIMARY Muzzle
      WeaponMuzzleFlash   = PRIMARY MuzzleFX
      WeaponFireFXBone    = SECONDARY Muzzle
      WeaponMuzzleFlash   = SECONDARY MuzzleFX
      TransitionKey       = TRANS_Stand
    End

    ConditionState        = REALLYDAMAGED
      IdleAnimation       = NICNSC_SKL.NICNSC_STB
      AnimationMode       = ONCE
      TransitionKey       = TRANS_StandDamaged
    End

    ; ------- Machine Gun Animations

    ConditionState      = USING_WEAPON_A 
      Animation         = NICNSC_SKL.NICNSC_ATA
      AnimationMode     = LOOP
      TransitionKey     = TRANS_Firing
    End

    ConditionState      = USING_WEAPON_A REALLYDAMAGED
      Animation         = NICNSC_SKL.NICNSC_ATC
      AnimationMode     = LOOP
      TransitionKey     = TRANS_FiringDamaged
    End

    ConditionState      = USING_WEAPON_B 
      Animation         = NICNSC_SKL.NICNSC_ATA
      AnimationMode     = LOOP
      TransitionKey     = TRANS_Firing
    End

    ConditionState      = USING_WEAPON_B REALLYDAMAGED
      Animation         = NICNSC_SKL.NICNSC_ATC
      AnimationMode     = LOOP
      TransitionKey     = TRANS_FiringDamaged
    End
    
    ; ------- Firing-related Transitions

    TransitionState   = TRANS_Firing TRANS_FiringDamaged
      Animation       = NICNSC_SKL.NICNSC_AA2AC
      AnimationMode   = ONCE
    End

    TransitionState   = TRANS_Stand TRANS_Firing
      Animation       = NICNSC_SKL.NICNSC_SA2AA
      AnimationMode   = ONCE
    End

    TransitionState   = TRANS_Firing TRANS_Stand
      Animation       = NICNSC_SKL.NICNSC_AA2SA
      AnimationMode   = ONCE
    End

    TransitionState   = TRANS_StandDamaged TRANS_FiringDamaged
      Animation       = NICNSC_SKL.NICNSC_ATCST
      AnimationMode   = ONCE
    End

    TransitionState   = TRANS_FiringDamaged TRANS_StandDamaged
      Animation       = NICNSC_SKL.NICNSC_ATCED
      AnimationMode   = ONCE
    End


    ; ------------- Damage Transitions --------------------
    TransitionState = TRANS_StandDamaged TRANS_RunDamaged
      Animation       = NICNSC_SKL.NICNSC_AA2AC
      AnimationMode   = ONCE
      AnimationSpeedFactorRange = 2 2
    End
    TransitionState = TRANS_RunDamaged TRANS_StandDamaged 
      Animation       = NICNSC_SKL.NICNSC_AA2AC
      AnimationMode   = ONCE_BACKWARDS
      AnimationSpeedFactorRange = 2 2
      Flags           = START_FRAME_LAST
    End
    TransitionState = TRANS_Stand TRANS_StandDamaged 
      Animation       = NICNSC_SKL.NICNSC_AA2SA
      AnimationMode   = ONCE_BACKWARDS
      AnimationSpeedFactorRange = 4 5
      Flags           = START_FRAME_LAST
    End

    ; ------- Bayonet Animations

    ConditionState    = PREATTACK_C 
      Animation       = NICNSC_SKL.NICNSC_ATB1
      AnimationMode   = ONCE
      TransitionKey   = TRANS_Stab
    End
    AliasConditionState = PREATTACK_C MOVING
    AliasConditionState = PREATTACK_C FIRING_C
    AliasConditionState = PREATTACK_C BETWEEN_FIRING_SHOTS_C

    ConditionState      = FIRING_C
      Animation         = NICNSC_SKL.NICNSC_ATB2
      AnimationMode     = ONCE
      ; this is basically a trick: this guy has a nontrivial animation for firing,
      ; and a long recycle time between shots. we want him to finish his fire animation
      ; (unless he's ordered to do something else), so this is just a handy trick that
      ; says, "if the previous state had this transition key, allow it to finish before
      ; switching to us, if possible".
      WaitForStateToFinishIfPossible = TRANS_Stab
    End
    AliasConditionState = BETWEEN_FIRING_SHOTS_C
    AliasConditionState = RELOADING_C

    ; ------- Parachuting Animations

    ConditionState    = FREEFALL
      Animation       = NICNSC_SKL.NICNSC_POP
      AnimationMode   = MANUAL
      Flags           = START_FRAME_FIRST
      TransitionKey   = TRANS_Falling
    End
    AliasConditionState = FREEFALL REALLYDAMAGED
    AliasConditionState = FREEFALL DYING

    ConditionState    = PARACHUTING
      Animation       = NICNSC_SKL.NICNSC_PHG
      AnimationMode   = LOOP
      Flags           = PRISTINE_BONE_POS_IN_FINAL_FRAME  ; our bone positions should come from the last frame, rather than the first
      TransitionKey   = TRANS_Chute
    End
    AliasConditionState = PARACHUTING REALLYDAMAGED
    AliasConditionState = PARACHUTING DYING

    TransitionState   = TRANS_Falling TRANS_Chute
      Animation       = NICNSC_SKL.NICNSC_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       = NICNSC_SKL.NICNSC_PTD
      AnimationMode   = ONCE
    End

    ; ------- Movement Animations

    ConditionState      = MOVING
      Animation         = NICNSC_SKL.NICNSC_RNA 26
      AnimationMode     = LOOP
      Flags             = RANDOMSTART
      TransitionKey     = None
      ParticleSysBone   = None InfantryDustTrails
    End
    AliasConditionState = MOVING ATTACKING

    ConditionState = MOVING REALLYDAMAGED
      Animation         = NICNSC_SKL.NICNSC_RNB 28
      AnimationMode     = LOOP
      Flags             = RANDOMSTART
      TransitionKey     = TRANS_RunDamaged
      TransitionKey     = None
    End
    AliasConditionState = MOVING ATTACKING REALLYDAMAGED

    ; ------- Bldg-capture

    ConditionState      = UNPACKING
      Model             = NICNSC_F_SKN
      Animation         = NICNSC_F_SKL.NICNSC_F_FDP1
      AnimationMode     = ONCE
    End
    AliasConditionState = UNPACKING REALLYDAMAGED

    ConditionState      = RAISING_FLAG
      Model             = NICNSC_F_SKN
      Animation         = NICNSC_F_SKL.NICNSC_F_FDP2
      AnimationMode     = ONCE
      TransitionKey     = TRANS_Raising
    End
    AliasConditionState = RAISING_FLAG REALLYDAMAGED

    ConditionState      = PACKING
      Model             = NICNSC_F_SKN
      Animation         = NICNSC_F_SKL.NICNSC_F_FDP1
      AnimationMode     = ONCE_BACKWARDS
      Flags             = START_FRAME_LAST
      TransitionKey     = TRANS_Packing
    End
    AliasConditionState = PACKING REALLYDAMAGED

    TransitionState     = TRANS_Raising TRANS_Packing
      Model             = NICNSC_F_SKN
      Animation         = NICNSC_F_SKL.NICNSC_F_FDP2
      AnimationMode     = ONCE_BACKWARDS
      Flags             = START_FRAME_LAST
    End

    ; ------- Dying Animations

    ConditionState      = DYING
      Animation         = NICNSC_SKL.NICNSC_DTA
      Animation         = NICNSC_SKL.NICNSC_DTB
      AnimationMode     = ONCE
      TransitionKey     = TRANS_Dying
    End

    TransitionState     = TRANS_Dying TRANS_Flailing
      Animation         = NICNSC_SKL.NICNSC_ATDE1
      AnimationMode     = ONCE
    End

    ConditionState      = DYING EXPLODED_FLAILING
      Animation         = NICNSC_SKL.NICNSC_ATDE2
      AnimationMode     = LOOP
      TransitionKey     = TRANS_Flailing
    End

    ConditionState      = DYING EXPLODED_BOUNCING
      Animation         = NICNSC_SKL.NICNSC_ATDE3
      AnimationMode     = ONCE
      TransitionKey     = None
    End

    ; ------- Misc Animations

    ConditionState      = SPECIAL_CHEERING
      Animation         = NICNSC_SKL.NICNSC_CHA
      AnimationMode     = LOOP
    End
End

;**** DESIGN parameters ***

  DisplayName      = OBJECT:TankCrew
  Side = China
  EditorSorting = INFANTRY
  TransportSlotCount = 1                 ;how many "slots" we take in a transport (0 == not transportable)

  WeaponSet
    Conditions = None 
    Weapon = PRIMARY RedguardMachineGun
    Weapon              = SECONDARY   RedguardBayonet
    AutoChooseSources   = PRIMARY    FROM_PLAYER FROM_SCRIPT FROM_AI
    AutoChooseSources   = SECONDARY   FROM_PLAYER FROM_SCRIPT FROM_AI
  End

  WeaponSet
    Conditions = PLAYER_UPGRADE
    Weapon = PRIMARY RedguardMachineGunUpgraded
    Weapon = SECONDARY   RedguardBayonet
    AutoChooseSources   = PRIMARY    FROM_PLAYER FROM_SCRIPT FROM_AI
    AutoChooseSources   = SECONDARY   FROM_PLAYER FROM_SCRIPT FROM_AI
  End

  ArmorSet
    Conditions      = None
    Armor           = HumanArmor
    DamageFX        = InfantryDamageFX
  End

  VisionRange = 150
  ShroudClearingRange = 150
  Prerequisites
    ;Object =
  End
  BuildCost = 100
  BuildTime = 1.0           

  ExperienceValue = 5 5 5 5    ;Experience point value at each level
  ExperienceRequired = 0 150 450 900  ;Experience points needed to gain each level
  IsTrainable = No             ;Can gain experience
  CrushableLevel         = 0  ;What am I?:        0 = for infantry, 1 = for trees, 2 = general vehicles

  CommandSet    = GenericCommandSet

;**** AUDIO Parameters *****************************
  ;VoiceSelect = RedGuardVoiceMove
  ;VoiceMove = RedGuardVoiceMove
  ;VoiceGuard = RedGuardVoiceAttack
  ;VoiceAttack = RedGuardVoiceAttack
  ;UnitSpecificSounds
    ;VoiceCreate = RedGuardVoiceCreate
  ;End 

;**** ENGINEERING Parameters *** ;CREW02
  RadarPriority = UNIT
  KindOf = PRELOAD SELECTABLE CAN_ATTACK ATTACK_NEEDS_LINE_OF_SIGHT CAN_CAST_REFLECTIONS INFANTRY ;IGNORED_IN_GUI

  Body = ActiveBody BodyTag_01
    MaxHealth       = 80.0
    InitialHealth   = 80.0
  End

  Behavior = AIUpdateInterface ModuleTag_03
    AutoAcquireEnemiesWhenIdle = Yes
  End

  Behavior = MobMemberSlavedUpdate ModuleTag_04
    MustCatchUpRadius   = 10
    NoNeedToCatchUpRadius = 5
    Squirrelliness = 0.03
    CatchUpCrisisBailTime = 30; this is in calls to this update, not in frames
  End

  Locomotor = SET_NORMAL AngryMobNormalLocomotor
  Locomotor = SET_WANDER AngryMobWanderLocomotor
  Locomotor = SET_PANIC AngryMobPanicLocomotor

  Behavior = PhysicsBehavior BehaviorTag_01
    Mass = 5.0
  End

  Behavior = SquishCollide ModuleTag_05
    ;nothing
  End


; --- begin Death modules ---
  Behavior = SlowDeathBehavior ModuleTag_Death01
    DeathTypes          = ALL -CRUSHED -SPLATTED -EXPLODED -BURNED -POISONED -POISONED_BETA -POISONED_GAMMA -LASERED
    SinkDelay           = 3000
    SinkRate            = 0.5     ; in Dist/Sec
    DestructionDelay    = 8000
    FX                  = INITIAL FX_RedGuardDie
    FX                  = INITIAL FX_BloodyPuddle3
  End
  Behavior = SlowDeathBehavior ModuleTag_Death02
    DeathTypes          = NONE +CRUSHED +SPLATTED
    SinkDelay           = 3000
    SinkRate            = 0.5     ; in Dist/Sec
    DestructionDelay    = 8000
    FX                  = INITIAL FX_GIDieCrushed
    FX                  = INITIAL FX_BloodyPuddle3
  End
  Behavior = SlowDeathBehavior ModuleTag_Death03
    DeathTypes          = NONE +EXPLODED
    SinkDelay           = 3000
    SinkRate            = 0.5     ; in Dist/Sec
    DestructionDelay    = 8000
    FX                  = INITIAL FX_RedGuardDie
    FX                  = INITIAL FX_BloodyPuddle3
    FlingForce          = 8
    FlingForceVariance  = 3
    FlingPitch          = 60
    FlingPitchVariance  = 10
  End
  Behavior = SlowDeathBehavior ModuleTag_Death04
    DeathTypes          = NONE +BURNED
    DestructionDelay    = 0
    FX                  = INITIAL FX_DieByFireChina
    OCL                 = INITIAL OCL_FlamingInfantry
  End
  Behavior = SlowDeathBehavior ModuleTag_Death05
    DeathTypes          = NONE +POISONED
    DestructionDelay    = 0
    FX                  = INITIAL FX_DieByToxinChina
    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_DieByToxinChina
    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_DieByToxinChina
    OCL                 = INITIAL OCL_ToxicInfantryGamma
  End
; --- end Death modules ---

  Behavior = HordeUpdate ModuleTag_06
    RubOffRadius = 60    ; if I am this close to a real hordesman, I will get to be an honorary hordesman
    UpdateRate = 1000    ; how often to recheck horde status (msec)
    Radius = 30          ; how close other units must be to us to count towards our horde-ness (~30 feet or so)
    KindOf = INFANTRY    ; what KindOf's must match to count towards horde-ness
    AlliesOnly = Yes     ; do we only count allies towards horde status? 
    ExactMatch = No      ; do we only count units of our exact same type towards horde status? (overrides kindof)
    Count = 2            ; how many units must be within Radius to grant us horde-ness
    Action = HORDE       ; when horde-ing, grant us the HORDE bonus
  End

  Behavior = WeaponSetUpgrade ModuleTag_07
    TriggeredBy = Upgrade_ChinaRifleUpgrade
  End

  Behavior = PoisonedBehavior BehaviorTag_08
    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

  Behavior = VeterancyCrateCollide       ModuleTag_08
    RequiredKindOf = VEHICLE      ; we only give our bonus to VEHICLEs we collide with
    ForbiddenKindOf = DOZER       ; but not to TRANSPORTs or DOZERs!
    EffectRange = 0               ; 0=="affect only the thing you collide with"
    AddsOwnerVeterancy = Yes      ; we add our own veterancy to the target (rather than just +1 level)
    IsPilot = Yes                 ; set the pilot flag because it's different than the veterancy crate and has extra checking
  End

  Behavior = AutoFindHealingUpdate   ModuleTag_09 ; This update will have the unit go to a healing station if injured. jba 
    ScanRate = 1000 ; once a second.
    ScanRange = 700 ;
    ;NeverHeal = 0.90 ;  don't heal if we are > 90% healthy.
    AlwaysHeal = 0.40 ; if we get below 40%, find healing right away.
  End

  Behavior = PilotFindVehicleUpdate   ModuleTag_10 ; This update will have the unit go to a vehicle. jba 
    ScanRate = 1000 ; once a second.
    ScanRange = 700 ;
    MinHealth = 0.5 ;  don't enter a vehicle less than 50% healthy.
  End
 
  Geometry = CYLINDER
  GeometryMajorRadius = 4.0 ; very thin
  GeometryHeight = 12.0
  GeometryIsSmall = Yes
  Shadow = SHADOW_DECAL
  ShadowSizeX = 14;
  ShadowSizeY = 14;
  Scale = 0.88
  ShadowTexture = ShadowI;
  BuildCompletion = APPEARS_AT_RALLY_POINT

End

;------------------------------------------------------------------------------
;------------------------------------------------------------------------------
Object AmericaInfantryTankCrew 

;**** ART Parameters **************************
  SelectPortrait         = SATankCrew
  ButtonImage            = SATankCrew
  
  UpgradeCameo1 = Upgrade_AmericaAdvancedTraining
  UpgradeCameo2 = Upgrade_AmericaChemicalSuits
  ;UpgradeCameo3 = NONE
  ;UpgradeCameo4 = NONE
  ;UpgradeCameo5 = NONE
  
  Draw = W3DModelDraw ModuleTag_01
    OkToChangeModelColor = Yes
    DefaultConditionState
      Model = None
    End
  End


;****DESIGN parameters **************************

  DisplayName      = OBJECT:TankCrew
  Side = America

  RadarPriority       = NOT_ON_RADAR

  EditorSorting   = INFANTRY
  ;TransportSlotCount = 1                 ;how many "slots" we take in a transport (0 == not transportable)

  WeaponSet
    Conditions = None 
    Weapon = PRIMARY GLAAngryMobNexusHarmlessWeapon
    Weapon = SECONDARY GLAAngryMobNexusHarmlessWeapon
    Weapon = TERTIARY GLAAngryMobNexusHarmlessWeapon
  End


  ArmorSet
    Conditions      = None
    Armor           = HumanArmor
    DamageFX        = InfantryDamageFX
  End

  BuildCost       = 1500
  BuildTime       = 35.0          ;in seconds    
  VisionRange     = 150  ; it can scout for the spawn
  ShroudClearingRange = 150

  Prerequisites
    ;Object =
    ;Object =
  End

  ExperienceValue    = 5 5 5 5 ;Experience point value at each level

  IsTrainable     = No



  CommandSet    = GenericCommandSet

;**** AUDIO Parameters *****************************
  VoiceSelect = CIAAgentVoiceMove
  VoiceMove = CIAAgentVoiceMove
  VoiceGuard = CIAAgentVoiceAttack
  VoiceAttack = CIAAgentVoiceAttack
  UnitSpecificSounds
    VoiceCreate = RangerVoiceCreate
  End


;**** ENGINEERING Parameters ******************************

  RadarPriority = UNIT
  KindOf = PRELOAD CAN_ATTACK INFANTRY ATTACK_NEEDS_LINE_OF_SIGHT IGNORES_SELECT_ALL SELECTABLE SCORE ;MOB_NEXUS
  Body = ActiveBody BodyTag_01
    MaxHealth       = 300.0
    InitialHealth   = 300.0
  End

  Behavior = AIUpdateInterface ModuleTag_03
    AutoAcquireEnemiesWhenIdle = Yes
  End

  Locomotor = SET_NORMAL AngryMobNexusLocomotor ;Important! don't make the Nexus any faster!
  Locomotor = SET_WANDER AngryMobNexusLocomotor ;Important! don't make the Nexus any faster!
  Locomotor = SET_PANIC AngryMobNexusLocomotor ;Important! don't make the Nexus any faster!

  Behavior = PhysicsBehavior ModuleTag_04
    Mass = 50.0
  End

  Behavior            = SpawnBehavior ModuleTag_05
    SpawnNumber       = 4
    ;SpawnReplaceDelay = 999999;DO NOT replace tank crew!

        SpawnTemplateName = AmericaInfantryTankCommander
        SpawnTemplateName = AmericaInfantryTankCrewman
        SpawnTemplateName = AmericaInfantryTankCrewman
        SpawnTemplateName = AmericaInfantryTankCrewman

    ExitByBudding = Yes;!

    InitialBurst = 4 ; the first set of 4 will not delay
    OneShot     = Yes
    AggregateHealth = Yes
    SlavesHaveFreeWill = No
  End

  Behavior = QueueProductionExitUpdate ModuleTag_06
    UnitCreatePoint   = X:  0.0  Y:  0.0   Z:0.0
    NaturalRallyPoint = X: 0.0  Y:  0.0   Z:0.0
    ExitDelay     = 5000 ; 5 sec
    InitialBurst = 4 ; the first set of 4 will not delay
  End

  Behavior = DestroyDie ModuleTag_07
    DeathTypes = ALL
  End

  ;Behavior = VeterancyCrateCollide       ModuleTag_08
    ;RequiredKindOf = VEHICLE      ; we only give our bonus to VEHICLEs we collide with
    ;ForbiddenKindOf = DOZER       ; but not to TRANSPORTs or DOZERs!
    ;EffectRange = 0               ; 0=="affect only the thing you collide with"
    ;AddsOwnerVeterancy = Yes      ; we add our own veterancy to the target (rather than just +1 level)
    ;IsPilot = Yes                 ; set the pilot flag because it's different than the veterancy crate and has extra checking
  ;End

  ;Behavior = AutoFindHealingUpdate   ModuleTag_09 ; This update will have the unit go to a healing station if injured. jba 
    ;ScanRate = 1000 ; once a second.
    ;ScanRange = 700 ;
    ;NeverHeal = 0.90 ;  don't heal if we are > 90% healthy.
    ;AlwaysHeal = 0.40 ; if we get below 40%, find healing right away.
  ;End

  ;Behavior = PilotFindVehicleUpdate   ModuleTag_10 ; This update will have the unit go to a vehicle. jba 
    ;ScanRate = 1000 ; once a second.
    ;ScanRange = 700 ;
    ;MinHealth = 0.5 ;  don't enter a vehicle less than 50% healthy.
  ;End

  ;Behavior = VeterancyGainCreate ModuleTag_11
    ;StartingLevel = VETERAN
  ;End

  Geometry = CYLINDER
  GeometryMajorRadius = 1.0
  GeometryMinorRadius = 1.0
  GeometryHeight = 1.0
  Scale = 0.88    
  GeometryIsSmall = Yes 
  Shadow = SHADOW_VOLUME

End

;------------------------------------------------------------------------------
;------------------------------------------------------------------------------
Object AmericaInfantryTankCommander

;**** ART Parameters ***
  SelectPortrait         = SATankCrew
  ButtonImage            = SATankCrew

  Draw = W3DModelDraw ModuleTag_01
    OkToChangeModelColor = Yes

    DefaultConditionState
      Model = AIRPlt_SKN
      IdleAnimation = AIRPlt_SKL.AIRPlt_STA 0 20
      IdleAnimation = AIRPlt_SKL.AIRPlt_IDA 
      IdleAnimation = AIRPlt_SKL.AIRPlt_IDB 
      AnimationMode = ONCE
      TransitionKey = TRANS_Stand
    End

    ConditionState = FREEFALL
      Animation = AIRPlt_SKL.AIRPLT_PFL
      AnimationMode = ONCE
      TransitionKey = TRANS_Falling
    End
    AliasConditionState = FREEFALL DYING

    ConditionState = PARACHUTING
      Animation = AIRPlt_SKL.AIRPlt_PHG
      AnimationMode = LOOP
      TransitionKey = TRANS_Chute
      WaitForStateToFinishIfPossible = TRANS_Falling
    End
    AliasConditionState = PARACHUTING DYING

    ConditionState = MOVING
      Animation = AIRPlt_SKL.AIRPlt_RNA 
      AnimationMode = LOOP
      TransitionKey = TRANS_Stand
      ParticleSysBone     = None InfantryDustTrails
    End
    

    ConditionState = DYING
      Animation = AIRPlt_SKL.AIRPlt_DTA 
      Animation = AIRPlt_SKL.AIRPlt_DTB 
      AnimationMode = ONCE
      TransitionKey = TRANS_Dying
    End

    TransitionState = TRANS_Dying TRANS_Flailing
      Animation = AIRPlt_SKL.AIRPlt_ADTE1
      AnimationMode = ONCE
    End

    ConditionState = DYING EXPLODED_FLAILING
      Animation = AIRPlt_SKL.AIRPlt_ADTE2
      AnimationMode = LOOP
      TransitionKey = TRANS_Flailing
    End

    ConditionState = DYING EXPLODED_BOUNCING
      Animation = AIRPlt_SKL.AIRPlt_ADTE3
      AnimationMode = ONCE
      TransitionKey = None
    End

    ConditionState = SPECIAL_CHEERING
      Animation = AIRPLT_SKL.AIRPLT_CHA
      AnimationMode = LOOP
    End

    ;@TODO -- MISSING ANIMATION FILE
    ;TransitionState = TRANS_Falling TRANS_Chute
    ;  Animation = AIRPLT_SKL.AIRPLT_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 = AIRPlt_SKL.AIRPlt_PTD
      AnimationMode = ONCE
    End

    ; NORMAL ATTACK
    ;--------------------------------------------------------
    ; Drawing gun
    ;ConditionState  = PREATTACK_A
      ;Animation     = NIOFCR_SKL.NIOFCR_ATAST
      ;AnimationMode = ONCE
    ;End
    ;AliasConditionState = PREATTACK_A MOVING
    ;AliasConditionState = PREATTACK_A FIRING_A
    ;AliasConditionState = PREATTACK_A BETWEEN_FIRING_SHOTS_A

    ; Firing gun
    ;ConditionState  = FIRING_A
      ;Animation     = NIOFCR_SKL.NIOFCR_ATALP
      ;AnimationMode = LOOP
      ;TransitionKey = TRANS_FIRING_A
    ;End
    ;ConditionState  = BETWEEN_FIRING_SHOTS_A
      ;Animation     = NIOFCR_SKL.NIOFCR_ATALP
      ;AnimationMode = LOOP
      ;TransitionKey = TRANS_FIRING_A
    ;End
    ;AliasConditionState = RELOADING_A
    ;AliasConditionState = MOVING FIRING_A
    ;AliasConditionState = MOVING BETWEEN_FIRING_SHOTS_A
    ;AliasConditionState = MOVING RELOADING_A

    ; This transition allows him to put his gun away when he's finished attacking.
    ;TransitionState = TRANS_FIRING_A TRANS_STAND
      ;Animation     = NIOFCR_SKL.NIOFCR_ATAED
      ;AnimationMode = ONCE
    ;End
    ;--------------------------------------------------------


  End

;**** DESIGN parameters ***

  DisplayName      = OBJECT:TankCrew
  Side = America
  EditorSorting = INFANTRY
  TransportSlotCount = 1                 ;how many "slots" we take in a transport (0 == not transportable)

  WeaponSet
    Conditions = None 
    Weapon = PRIMARY GLAAngryMobPistolWeapon
  End

  ArmorSet
    Conditions      = None
    Armor           = HumanArmor
    DamageFX        = InfantryDamageFX
  End
  ArmorSet
    Conditions            = PLAYER_UPGRADE
    Armor                 = ChemSuitHumanArmor
    DamageFX              = None
  End

  VisionRange = 150
  ShroudClearingRange = 150
  Prerequisites
    ;Object =
  End
  BuildCost = 100
  BuildTime = 1.0           

  ExperienceValue = 5 5 5 5    ;Experience point value at each level
  ExperienceRequired = 0 150 450 900  ;Experience points needed to gain each level
  IsTrainable = No             ;Can gain experience
  CrushableLevel         = 0  ;What am I?:        0 = for infantry, 1 = for trees, 2 = general vehicles

  CommandSet    = GenericCommandSet

;**** AUDIO Parameters *****************************
  ;VoiceSelect = CIAAgentVoiceMove
  ;VoiceMove = CIAAgentVoiceMove
  ;VoiceGuard = CIAAgentVoiceAttack
  ;VoiceAttack = CIAAgentVoiceAttack
  ;UnitSpecificSounds
    ;VoiceCreate = RangerVoiceCreate
  ;End

;**** ENGINEERING Parameters *** ;CREW01
  RadarPriority = UNIT
  KindOf = PRELOAD SELECTABLE CAN_ATTACK ATTACK_NEEDS_LINE_OF_SIGHT CAN_CAST_REFLECTIONS INFANTRY SALVAGER ;IGNORED_IN_GUI

  Body = ActiveBody BodyTag_01
    MaxHealth       = 100.0
    InitialHealth   = 100.0
  End

  Behavior = AIUpdateInterface ModuleTag_03
    AutoAcquireEnemiesWhenIdle = Yes
  End

  Behavior = MobMemberSlavedUpdate ModuleTag_04
    MustCatchUpRadius   = 10
    NoNeedToCatchUpRadius = 5
    Squirrelliness = 0.02
    CatchUpCrisisBailTime = 30; this is in calls to this update, not in frames
  End

  Locomotor = SET_NORMAL AngryMobNormalLocomotor
  Locomotor = SET_WANDER AngryMobWanderLocomotor
  Locomotor = SET_PANIC AngryMobPanicLocomotor

  Behavior = PhysicsBehavior BehaviorTag_01
    Mass = 5.0
  End

  Behavior = SquishCollide ModuleTag_05
    ;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_RangerDie
    FX                  = INITIAL FX_BloodyPuddle3
  End
  Behavior = SlowDeathBehavior ModuleTag_Death02
    DeathTypes          = NONE +CRUSHED +SPLATTED
    SinkDelay           = 3000
    SinkRate            = 0.5     ; in Dist/Sec
    DestructionDelay    = 8000
    FX                  = INITIAL FX_GIDieCrushed
    FX                  = INITIAL FX_BloodyPuddle3
  End
  Behavior = SlowDeathBehavior ModuleTag_Death03
    DeathTypes          = NONE +EXPLODED
    SinkDelay           = 3000
    SinkRate            = 0.5     ; in Dist/Sec
    DestructionDelay    = 8000
    FX                  = INITIAL FX_RangerDie
    FX                  = INITIAL FX_BloodyPuddle3
    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_DieByToxinGLA
    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_DieByToxinGLA
    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_DieByToxinGLA
    OCL                 = INITIAL OCL_ToxicInfantryGamma
  End
; --- end Death modules ---

  Behavior                = ArmorUpgrade ModuleTag_Armor01
    TriggeredBy           = Upgrade_AmericaChemicalSuits
  End

  Behavior = ExperienceScalarUpgrade ModuleTag_06
    TriggeredBy   = Upgrade_AmericaAdvancedTraining
    AddXPScalar   = 1.0 ;Increases experience gained by an additional 100%
  End

  Behavior = PoisonedBehavior BehaviorTag_02
    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

  Behavior = VeterancyCrateCollide       ModuleTag_07
    RequiredKindOf = VEHICLE      ; we only give our bonus to VEHICLEs we collide with
    ForbiddenKindOf = DOZER       ; but not to TRANSPORTs or DOZERs!
    EffectRange = 0               ; 0=="affect only the thing you collide with"
    AddsOwnerVeterancy = Yes      ; we add our own veterancy to the target (rather than just +1 level)
    IsPilot = Yes                 ; set the pilot flag because it's different than the veterancy crate and has extra checking
  End

  Behavior = AutoFindHealingUpdate   ModuleTag_08 ; This update will have the unit go to a healing station if injured. jba 
    ScanRate = 1000 ; once a second.
    ScanRange = 700 ;
    ;NeverHeal = 0.90 ;  don't heal if we are > 90% healthy.
    AlwaysHeal = 0.40 ; if we get below 40%, find healing right away.
  End

  Behavior = PilotFindVehicleUpdate   ModuleTag_09 ; This update will have the unit go to a vehicle. jba 
    ScanRate = 1000 ; once a second.
    ScanRange = 700 ;
    MinHealth = 0.5 ;  don't enter a vehicle less than 50% healthy.
  End

  Behavior = VeterancyGainCreate ModuleTag_10
    StartingLevel = VETERAN
  End
 
  Geometry = CYLINDER
  GeometryMajorRadius = 4.0 ; very thin
  GeometryHeight = 12.0
  GeometryIsSmall = Yes
  Shadow = SHADOW_DECAL
  ShadowSizeX = 14;
  ShadowSizeY = 14;
  Scale = 0.88
  ShadowTexture = ShadowI;
  BuildCompletion = APPEARS_AT_RALLY_POINT

End

;------------------------------------------------------------------------------
;------------------------------------------------------------------------------
Object AmericaInfantryTankCrewman

;**** ART Parameters ***
  SelectPortrait         = SATankCrew
  ButtonImage            = SATankCrew

  Draw = W3DModelDraw ModuleTag_01

    OkToChangeModelColor = Yes
    
    DefaultConditionState
      Model             = CIUNSL_SKN
      IdleAnimation     = CIUNSL_SKL.CIUNSL_STA 0 21
      IdleAnimation     = CIUNSL_SKL.CIUNSL_ID1
      IdleAnimation     = CIUNSL_SKL.CIUNSL_ID2
      AnimationMode     = ONCE
      WeaponFireFXBone  = PRIMARY Muzzle
      WeaponMuzzleFlash = PRIMARY MuzzleFX
      WeaponFireFXBone  = SECONDARY Muzzle
      WeaponMuzzleFlash = SECONDARY MuzzleFX
      TransitionKey     = TRANS_Stand
    End

    ConditionState      = FIRING_A 
      Animation         = CIUNSL_SKL.CIUNSL_ATA1_LP
      AnimationMode     = LOOP
      TransitionKey     = TRANS_FiringA
    End
    AliasConditionState = BETWEEN_FIRING_SHOTS_A
    AliasConditionState = RELOADING_A

    TransitionState     = TRANS_Stand TRANS_FiringA
      Animation         = CIUNSL_SKL.CIUNSL_ATA1_ST
      AnimationMode     = ONCE
      AnimationSpeedFactorRange = 4 4
    End

    TransitionState     = TRANS_FiringA TRANS_Stand
      Animation         = CIUNSL_SKL.CIUNSL_ATA1_ED
      AnimationMode     = ONCE
      AnimationSpeedFactorRange = 4 4
    End

    ; these aliases handle the attack-move case.
    AliasConditionState = MOVING FIRING_A
    AliasConditionState = MOVING BETWEEN_FIRING_SHOTS_A
    AliasConditionState = MOVING RELOADING_A

   
    ConditionState      = FIRING_B 
      Animation         = CIUNSL_SKL.CIUNSL_ATA1_LP
      AnimationMode     = LOOP
      TransitionKey     = TRANS_FiringA
    End
    AliasConditionState = BETWEEN_FIRING_SHOTS_B
    AliasConditionState = RELOADING_B

    TransitionState     = TRANS_Stand TRANS_FiringB
      Animation         = CIUNSL_SKL.CIUNSL_ATA1_ST
      AnimationMode     = ONCE
      AnimationSpeedFactorRange = 4 4
    End

    TransitionState     = TRANS_FiringB TRANS_Stand
      Animation         = CIUNSL_SKL.CIUNSL_ATA1_ED
      AnimationMode     = ONCE
      AnimationSpeedFactorRange = 4 4
    End

    ; these aliases handle the attack-move case.
    AliasConditionState = MOVING FIRING_B
    AliasConditionState = MOVING BETWEEN_FIRING_SHOTS_B
    AliasConditionState = MOVING RELOADING_B

    ConditionState      = FREEFALL
      Animation         = CIUNSL_SKL.CIUNSL_PFL
      AnimationMode     = LOOP
      TransitionKey     = TRANS_Falling
    End

    ConditionState      = PARACHUTING
      Animation         = CIUNSL_SKL.CIUNSL_PHG
      AnimationMode     = LOOP
      TransitionKey     = TRANS_Chute
    End
    AliasConditionState = PARACHUTING DYING

    ConditionState      = MOVING
      Animation         = CIUNSL_SKL.CIUNSL_RNA 
      AnimationMode     = LOOP
      Flags             = RANDOMSTART
      TransitionKey     = None
    End

    ConditionState      = DYING
      Animation         = CIUNSL_SKL.CIUNSL_DTA
      Animation         = CIUNSL_SKL.CIUNSL_DTB
      AnimationMode     = ONCE
      TransitionKey     = TRANS_Dying
    End

    TransitionState     = TRANS_Dying TRANS_Flailing
      Animation         = CIUNSL_SKL.CIUNSL_ADTA1
      AnimationMode     = ONCE
    End

    ConditionState      = DYING EXPLODED_FLAILING
      Animation         = CIUNSL_SKL.CIUNSL_ADTA2
      AnimationMode     = LOOP
      TransitionKey     = TRANS_Flailing
    End

    ConditionState      = DYING EXPLODED_BOUNCING
      Animation         = CIUNSL_SKL.CIUNSL_ADTA3
      AnimationMode     = ONCE
      TransitionKey     = None
    End
    AliasConditionState = DYING SPLATTED

    TransitionState     = TRANS_Falling TRANS_Chute
      Animation         = CIUNSL_SKL.CIUNSL_POP
      AnimationMode     = ONCE
    End

    TransitionState     = TRANS_Chute TRANS_Stand
      Animation         = CIUNSL_SKL.CIUNSL_PTD
      AnimationMode     = ONCE
    End

    ; ------- Bldg-capture

    ConditionState      = UNPACKING
      Model             = CIUNSL_SKN
      Animation         = CIUNSL_SKL.AIRngr_F_FDP1
      AnimationMode     = ONCE
    End
    AliasConditionState = UNPACKING REALLYDAMAGED


    ConditionState      = RAISING_FLAG
      Model             = CIUNSL_SKN
      Animation         = CIUNSL_SKL.AIRngr_F_FDP2
      AnimationMode     = ONCE
      TransitionKey     = TRANS_Raising
    End
    AliasConditionState = RAISING_FLAG REALLYDAMAGED

    ConditionState      = PACKING
      Model             = CIUNSL_SKN
      Animation         = CIUNSL_F_SKL.AIRngr_F_FDP1
      AnimationMode     = ONCE_BACKWARDS
      Flags             = START_FRAME_LAST
      TransitionKey     = TRANS_Packing
    End
    AliasConditionState = PACKING REALLYDAMAGED

    TransitionState     = TRANS_Raising TRANS_Packing
      Model             = CIUNSL_SKN
      Animation         = CIUNSL_F_SKL.AIRngr_F_FDP2
      AnimationMode     = ONCE_BACKWARDS
      Flags             = START_FRAME_LAST
    End

    ; --- RAPPELLING ANIMATIONS
    ConditionState      = RAPPELLING
      Animation         = CIUNSL_SKL.CIUNSL_PHG ;30
      AnimationMode     = LOOP
      Flags             = RANDOMSTART
      TransitionKey     = TRANS_Rappelling
    End
    AliasConditionState = MOVING RAPPELLING

    TransitionState     = TRANS_Rappelling TRANS_Stand
      Animation         = CIUNSL_SKL.CIUNSL_PHG
      AnimationMode     = ONCE
    End

    TransitionState     = TRANS_Rappelling TRANS_StandInjured
      Animation         = CIUNSL_SKL.CIUNSL_PHG
      AnimationMode     = ONCE
    End

  End

;**** DESIGN parameters ***

  DisplayName      = OBJECT:TankCrew
  Side = America
  EditorSorting = INFANTRY
  TransportSlotCount = 1                 ;how many "slots" we take in a transport (0 == not transportable)

  WeaponSet
    Conditions = None 
    ;Weapon = PRIMARY Shotgun
    Weapon = PRIMARY TankCrewAssaultRifle
    ;AutoChooseSources   = PRIMARY     FROM_PLAYER FROM_SCRIPT FROM_AI
    AutoChooseSources   = PRIMARY   FROM_PLAYER FROM_SCRIPT FROM_AI
  End

  ArmorSet
    Conditions      = None
    Armor           = HumanArmor
    DamageFX        = InfantryDamageFX
  End
  ArmorSet
    Conditions            = PLAYER_UPGRADE
    Armor                 = ChemSuitHumanArmor
    DamageFX              = None
  End

  VisionRange = 150
  ShroudClearingRange = 150
  Prerequisites
    ;Object =
  End
  BuildCost = 100
  BuildTime = 1.0           

  ExperienceValue = 5 5 5 5    ;Experience point value at each level
  ExperienceRequired = 0 150 450 900  ;Experience points needed to gain each level
  IsTrainable = No             ;Can gain experience
  CrushableLevel         = 0  ;What am I?:        0 = for infantry, 1 = for trees, 2 = general vehicles

  CommandSet    = GenericCommandSet

;**** AUDIO Parameters *****************************
  ;VoiceSelect = CIAAgentVoiceMove
  ;VoiceMove = CIAAgentVoiceMove
  ;VoiceGuard = CIAAgentVoiceAttack
  ;VoiceAttack = CIAAgentVoiceAttack
  ;UnitSpecificSounds
    ;VoiceCreate = RangerVoiceCreate
  ;End

;**** ENGINEERING Parameters *** ;CREW02
  RadarPriority = UNIT
  KindOf = PRELOAD SELECTABLE CAN_ATTACK ATTACK_NEEDS_LINE_OF_SIGHT CAN_CAST_REFLECTIONS INFANTRY ;IGNORED_IN_GUI

  Body = ActiveBody BodyTag_01
    MaxHealth       = 80.0
    InitialHealth   = 80.0
  End

  Behavior = AIUpdateInterface ModuleTag_03
    AutoAcquireEnemiesWhenIdle = Yes
  End

  Behavior = MobMemberSlavedUpdate ModuleTag_04
    MustCatchUpRadius   = 10
    NoNeedToCatchUpRadius = 5
    Squirrelliness = 0.03
    CatchUpCrisisBailTime = 30; this is in calls to this update, not in frames
  End

  Locomotor = SET_NORMAL AngryMobNormalLocomotor
  Locomotor = SET_WANDER AngryMobWanderLocomotor
  Locomotor = SET_PANIC AngryMobPanicLocomotor

  Behavior = PhysicsBehavior BehaviorTag_01
    Mass = 5.0
  End

  Behavior = SquishCollide ModuleTag_05
    ;nothing
  End


; --- begin Death modules ---
  Behavior = SlowDeathBehavior ModuleTag_Death01
    DeathTypes          = ALL -CRUSHED -SPLATTED -EXPLODED -BURNED -POISONED -POISONED_BETA -POISONED_GAMMA -LASERED
    SinkDelay           = 3000
    SinkRate            = 0.5     ; in Dist/Sec
    DestructionDelay    = 8000
    FX                  = INITIAL FX_RedGuardDie
    FX                  = INITIAL FX_BloodyPuddle3
  End
  Behavior = SlowDeathBehavior ModuleTag_Death02
    DeathTypes          = NONE +CRUSHED +SPLATTED
    SinkDelay           = 3000
    SinkRate            = 0.5     ; in Dist/Sec
    DestructionDelay    = 8000
    FX                  = INITIAL FX_GIDieCrushed
    FX                  = INITIAL FX_BloodyPuddle3
  End
  Behavior = SlowDeathBehavior ModuleTag_Death03
    DeathTypes          = NONE +EXPLODED
    SinkDelay           = 3000
    SinkRate            = 0.5     ; in Dist/Sec
    DestructionDelay    = 8000
    FX                  = INITIAL FX_RedGuardDie
    FX                  = INITIAL FX_BloodyPuddle3
    FlingForce          = 8
    FlingForceVariance  = 3
    FlingPitch          = 60
    FlingPitchVariance  = 10
  End
  Behavior = SlowDeathBehavior ModuleTag_Death04
    DeathTypes          = NONE +BURNED
    DestructionDelay    = 0
    FX                  = INITIAL FX_DieByFireChina
    OCL                 = INITIAL OCL_FlamingInfantry
  End
  Behavior = SlowDeathBehavior ModuleTag_Death05
    DeathTypes          = NONE +POISONED
    DestructionDelay    = 0
    FX                  = INITIAL FX_DieByToxinChina
    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_DieByToxinChina
    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_DieByToxinChina
    OCL                 = INITIAL OCL_ToxicInfantryGamma
  End
; --- end Death modules ---

  Behavior = ExperienceScalarUpgrade ModuleTag_06
    TriggeredBy   = Upgrade_AmericaAdvancedTraining
    AddXPScalar   = 1.0 ;Increases experience gained by an additional 100%
  End

  Behavior                = ArmorUpgrade ModuleTag_Armor01
    TriggeredBy           = Upgrade_AmericaChemicalSuits
  End

  Behavior = PoisonedBehavior BehaviorTag_07
    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

  Behavior = VeterancyCrateCollide       ModuleTag_08
    RequiredKindOf = VEHICLE      ; we only give our bonus to VEHICLEs we collide with
    ForbiddenKindOf = DOZER       ; but not to TRANSPORTs or DOZERs!
    EffectRange = 0               ; 0=="affect only the thing you collide with"
    AddsOwnerVeterancy = Yes      ; we add our own veterancy to the target (rather than just +1 level)
    IsPilot = Yes                 ; set the pilot flag because it's different than the veterancy crate and has extra checking
  End

  Behavior = AutoFindHealingUpdate   ModuleTag_09 ; This update will have the unit go to a healing station if injured. jba 
    ScanRate = 1000 ; once a second.
    ScanRange = 700 ;
    ;NeverHeal = 0.90 ;  don't heal if we are > 90% healthy.
    AlwaysHeal = 0.40 ; if we get below 40%, find healing right away.
  End

  Behavior = PilotFindVehicleUpdate   ModuleTag_10 ; This update will have the unit go to a vehicle. jba 
    ScanRate = 1000 ; once a second.
    ScanRange = 700 ;
    MinHealth = 0.5 ;  don't enter a vehicle less than 50% healthy.
  End

  ;Behavior = VeterancyGainCreate ModuleTag_11
    ;StartingLevel = VETERAN
  ;End
 
  Geometry = CYLINDER
  GeometryMajorRadius = 4.0 ; very thin
  GeometryHeight = 12.0
  GeometryIsSmall = Yes
  Shadow = SHADOW_DECAL
  ShadowSizeX = 14;
  ShadowSizeY = 14;
  Scale = 0.88
  ShadowTexture = ShadowI;
  BuildCompletion = APPEARS_AT_RALLY_POINT

End

;------------------------------------------------------------------------------
;------------------------------------------------------------------------------
Object GLAInfantryTankCrew 

;**** ART Parameters **************************
  SelectPortrait         = SATankCrew
  ButtonImage            = SATankCrew
  
  UpgradeCameo1 = Upgrade_GLAMolotovCocktail
  UpgradeCameo2 = Upgrade_GLAKevArmor
  UpgradeCameo3 = Upgrade_GLAArmTheMob
  ;UpgradeCameo4 = NONE
  ;UpgradeCameo5 = NONE
  
  Draw = W3DModelDraw ModuleTag_01
    OkToChangeModelColor = Yes
    DefaultConditionState
      Model = None
    End
  End


;****DESIGN parameters **************************

  DisplayName      = OBJECT:TankCrew
  Side = GLA

  RadarPriority       = NOT_ON_RADAR

  EditorSorting   = INFANTRY
  ;TransportSlotCount = 1                 ;how many "slots" we take in a transport (0 == not transportable)

  WeaponSet
    Conditions = None 
    Weapon = PRIMARY GLAAngryMobNexusHarmlessWeapon
    Weapon = SECONDARY GLAAngryMobNexusHarmlessWeapon
    Weapon = TERTIARY GLAAngryMobNexusHarmlessWeapon
  End


  ArmorSet
    Conditions      = None
    Armor           = HumanArmor
    DamageFX        = InfantryDamageFX
  End

  BuildCost       = 1500
  BuildTime       = 35.0          ;in seconds    
  VisionRange     = 150  ; it can scout for the spawn
  ShroudClearingRange = 150

  Prerequisites
    ;Object =
    ;Object =
  End

  ExperienceValue    = 5 5 5 5 ;Experience point value at each level

  IsTrainable     = No



  CommandSet    = GenericCommandSet

;**** AUDIO Parameters *****************************
  VoiceSelect = RPGTrooperVoiceMove
  VoiceMove = RPGTrooperVoiceMove
  VoiceGuard = RPGTrooperVoiceAttack
  VoiceAttack = RPGTrooperVoiceAttack
  UnitSpecificSounds
    VoiceCreate = RPGTrooperVoiceCreate
  End


;**** ENGINEERING Parameters ******************************

  RadarPriority = UNIT
  KindOf = PRELOAD CAN_ATTACK INFANTRY ATTACK_NEEDS_LINE_OF_SIGHT IGNORES_SELECT_ALL SELECTABLE SCORE ;MOB_NEXUS
  Body = ActiveBody BodyTag_01
    MaxHealth       = 300.0
    InitialHealth   = 300.0
  End

  Behavior = AIUpdateInterface ModuleTag_03
    AutoAcquireEnemiesWhenIdle = Yes
  End

  Locomotor = SET_NORMAL AngryMobNexusLocomotor ;Important! don't make the Nexus any faster!
  Locomotor = SET_WANDER AngryMobNexusLocomotor ;Important! don't make the Nexus any faster!
  Locomotor = SET_PANIC AngryMobNexusLocomotor ;Important! don't make the Nexus any faster!

  Behavior = PhysicsBehavior ModuleTag_04
    Mass = 50.0
  End

  Behavior            = SpawnBehavior ModuleTag_05
    SpawnNumber       = 4
    ;SpawnReplaceDelay = 999999;DO NOT replace tank crew!

        SpawnTemplateName = GLAInfantryTankCommander
        SpawnTemplateName = GLAInfantryTankCrewman01
        SpawnTemplateName = GLAInfantryTankCrewman01
        SpawnTemplateName = GLAInfantryTankCrewman02

    ExitByBudding = Yes;!

    InitialBurst = 4 ; the first set of 4 will not delay
    OneShot     = Yes
    AggregateHealth = Yes
    SlavesHaveFreeWill = No
  End

  Behavior = QueueProductionExitUpdate ModuleTag_06
    UnitCreatePoint   = X:  0.0  Y:  0.0   Z:0.0
    NaturalRallyPoint = X: 0.0  Y:  0.0   Z:0.0
    ExitDelay     = 5000 ; 5 sec
    InitialBurst = 4 ; the first set of 4 will not delay
  End

  Behavior = DestroyDie ModuleTag_07
    DeathTypes = ALL
  End

  ;Behavior = VeterancyCrateCollide       ModuleTag_08
    ;RequiredKindOf = VEHICLE      ; we only give our bonus to VEHICLEs we collide with
    ;ForbiddenKindOf = DOZER       ; but not to TRANSPORTs or DOZERs!
    ;EffectRange = 0               ; 0=="affect only the thing you collide with"
    ;AddsOwnerVeterancy = Yes      ; we add our own veterancy to the target (rather than just +1 level)
    ;IsPilot = Yes                 ; set the pilot flag because it's different than the veterancy crate and has extra checking
  ;End

  ;Behavior = AutoFindHealingUpdate   ModuleTag_09 ; This update will have the unit go to a healing station if injured. jba 
    ;ScanRate = 1000 ; once a second.
    ;ScanRange = 700 ;
    ;NeverHeal = 0.90 ;  don't heal if we are > 90% healthy.
    ;AlwaysHeal = 0.40 ; if we get below 40%, find healing right away.
  ;End

  ;Behavior = PilotFindVehicleUpdate   ModuleTag_10 ; This update will have the unit go to a vehicle. jba 
    ;ScanRate = 1000 ; once a second.
    ;ScanRange = 700 ;
    ;MinHealth = 0.5 ;  don't enter a vehicle less than 50% healthy.
  ;End

  ;Behavior = VeterancyGainCreate ModuleTag_11
    ;StartingLevel = VETERAN
  ;End

  Geometry = CYLINDER
  GeometryMajorRadius = 1.0
  GeometryMinorRadius = 1.0
  GeometryHeight = 1.0
  Scale = 0.88    
  GeometryIsSmall = Yes 
  Shadow = SHADOW_VOLUME

End

;------------------------------------------------------------------------------
;------------------------------------------------------------------------------
Object GLAInfantryTankCommander

;**** ART Parameters ***
  SelectPortrait         = SATankCrew
  ButtonImage            = SATankCrew

  Draw = W3DModelDraw DrawTag_01
    OkToChangeModelColor = Yes



    ; WHILE CARRYING PISTOL
    ;---------------------------------------------------------
    DefaultConditionState ;Idle with Pistol Holstered
      Model = UIMOB05_SKN
      IdleAnimation = UIMOB05_SKL.UIMOB05_IDA1 0 12
      IdleAnimation = UIMOB05_SKL.UIMOB05_IDA2 0 5
      IdleAnimation = UIMOB05_SKL.UIMOB05_CHA  0 5
      IdleAnimation = UIMOB05_SKL.UIMOB05_STA  0 5
      AnimationMode = ONCE
      AnimationSpeedFactorRange 0.9 1.1
      TransitionKey = TRANS_STAND_A

      WeaponFireFXBone = PRIMARY Muzzle01
      WeaponMuzzleFlash = PRIMARY Muzzle01
    End

    ; Drawing pistol
    ConditionState  = PREATTACK_A
      Animation     = UIMOB05_SKL.UIMOB05_ATA1_ST ; start firing
      AnimationMode = ONCE
    End
    AliasConditionState = PREATTACK_A FIRING_A
    AliasConditionState = PREATTACK_A BETWEEN_FIRING_SHOTS_A

    ; Firing pistol
    ConditionState = FIRING_A
      Animation = UIMOB05_SKL.UIMOB05_ATA1_LP ; looping firing
      AnimationMode = LOOP
      TransitionKey = TRANS_FIRING_A
    End
    AliasConditionState  = BETWEEN_FIRING_SHOTS_A
    
    ConditionState  = RELOADING_A
      Animation     = UIMOB05_SKL.UIMOB05_ATA1_ED ; end firing
      AnimationMode = ONCE
    End

    ; This transition allows him to put his gun away when he's finished attacking.
    TransitionState = TRANS_FIRING_A TRANS_STAND_A
      Animation     = UIMOB05_SKL.UIMOB05_ATA1_ED ; end firing
      AnimationMode = ONCE
    End

    ConditionState = MOVING
      Animation = UIMOB05_SKL.UIMOB05_RNA 
      AnimationMode = LOOP
      Flags = RANDOMSTART
      TransitionKey   = MOVING
      ParticleSysBone   = None InfantryDustTrails
    End
    AliasConditionState = MOVING RELOADING_A
    AliasConditionState = MOVING PREATTACK_A
    AliasConditionState = MOVING FIRING_A
    AliasConditionState = MOVING BETWEEN_FIRING_SHOTS_A
    AliasConditionState = MOVING RELOADING_C RELOADING_A 
    AliasConditionState = MOVING PREATTACK_C BETWEEN_FIRING_SHOTS_A 

    ConditionState = DYING
      Animation = UIMOB05_SKL.UIMOB05_DA1    
      Animation = UIMOB05_SKL.UIMOB05_DA2
      AnimationMode = ONCE
      TransitionKey = TRANS_Dying
    End


    ConditionState = SPECIAL_CHEERING
      Animation = UIMOB05_SKL.UIMOB05_CHA
      AnimationMode = ONCE
    End

    ;--------------------------------------------------------

    ; TRANSITION FROM PISTOL TO AK47
    TransitionState = TRANS_STAND_A TRANS_STAND_AK
      Animation = UIMOB05_SKL.UIMOB05_TA-D
      AnimationMode = ONCE
    End


    ; WHILE CARRYING AK47 
    ;---------------------------------------------------------
    ConditionState WEAPONSET_PLAYER_UPGRADE ;Idle with AK Slung
      Model = UIMOB05_SKN
      IdleAnimation = UIMOB05_SKL.UIMOB05_IDD1 0 6
      IdleAnimation = UIMOB05_SKL.UIMOB05_IDD2 0 6
      IdleAnimation = UIMOB05_SKL.UIMOB05_CHD  0 6
      IdleAnimation = UIMOB05_SKL.UIMOB05_STD
      AnimationMode = ONCE
      AnimationSpeedFactorRange 0.9 1.1
      TransitionKey = TRANS_STAND_AK
      WeaponFireFXBone = SECONDARY MuzzleAK
      WeaponMuzzleFlash = SECONDARY MuzzleAKFX
    End

    ConditionState = MOVING WEAPONSET_PLAYER_UPGRADE
      Animation = UIMOB05_SKL.UIMOB05_RND 
      AnimationMode = LOOP
      Flags = RANDOMSTART
      TransitionKey   = MOVING_AK
    End

    ConditionState = DYING WEAPONSET_PLAYER_UPGRADE
      Animation = UIMOB05_SKL.UIMOB05_DD1    
      Animation = UIMOB05_SKL.UIMOB05_DD2
      AnimationMode = ONCE
      TransitionKey = TRANS_Dying
    End

    ConditionState = SPECIAL_CHEERING WEAPONSET_PLAYER_UPGRADE
      Animation = UIMOB05_SKL.UIMOB05_CHD
      AnimationMode = ONCE
    End

    ; Drawing AK47
    ConditionState  = PREATTACK_B WEAPONSET_PLAYER_UPGRADE
      Animation     = UIMOB05_SKL.UIMOB05_ATD1_ST ; start firing
      AnimationMode = ONCE
    End
    AliasConditionState = PREATTACK_B FIRING_B WEAPONSET_PLAYER_UPGRADE
    AliasConditionState = PREATTACK_B BETWEEN_FIRING_SHOTS_B WEAPONSET_PLAYER_UPGRADE

    ; Firing Gun
    ConditionState = FIRING_B WEAPONSET_PLAYER_UPGRADE
      Animation = UIMOB05_SKL.UIMOB05_ATD1_LP ; looping firing
      AnimationMode = LOOP
      WeaponFireFXBone = PRIMARY MuzzleAK
      WeaponMuzzleFlash = PRIMARY MuzzleAKFX
      TransitionKey = TRANS_FIRING_AK
    End
    AliasConditionState  = BETWEEN_FIRING_SHOTS_B WEAPONSET_PLAYER_UPGRADE


    ConditionState  = RELOADING_B WEAPONSET_PLAYER_UPGRADE
      Animation     = UIMOB05_SKL.UIMOB05_ATD1_ED ; end firing
      AnimationMode = ONCE
    End


    ; This transition allows him to put his gun away when he's finished attacking.
    TransitionState = TRANS_FIRING_AK TRANS_STAND_AK
      Animation     = UIMOB05_SKL.UIMOB05_ATD1_ED ; end firing
      AnimationMode = ONCE
    End


;    ;Throwing bottle----------------------------------------------------------------
;    ConditionState = PREATTACK_C 
;      Animation     = UIMOB05_SKL.UIMOB05_ATCA_BF ; the wind up
;    End
;    AliasConditionState = PREATTACK_C FIRING_A
;    AliasConditionState = PREATTACK_C RELOADING_A
;    AliasConditionState = PREATTACK_C BETWEEN_FIRING_SHOTS_A 
;
;    ConditionState = FIRING_C 
;      Animation     = UIMOB05_SKL.UIMOB05_ATCA_AF ; the release and follow-thru
;      TransitionKey = TRANS_THROW
;    End
;    AliasConditionState = FIRING_C BETWEEN_FIRING_SHOTS_A
;
;    ConditionState RELOADING_C
;      Animation =UIMOB05_SKL.UIMOB05_IDA1
;      WaitForStateToFinishIfPossible = TRANS_THROW ; universal hub for follow-thru
;    End
;    AliasConditionState = RELOADING_C RELOADING_A
;    AliasConditionState = RELOADING_C FIRING_A
;    AliasConditionState = RELOADING_C BETWEEN_FIRING_SHOTS_A


;    TransitionState = TRANSXXX TRANS_THROW
;      Animation     = UIMOB05_SKL.UIMOB05_XXXXXXXXputaway gun and take out bottle
;    End

;    TransitionState = TRANS_THROW TRANS_FIRING_A
;      Animation     = UIMOB05_SKL.UIMOB05_XXXXXXXXputaway bottle and get PISTOL
;    End

;    TransitionState = TRANSXXXAK TRANS_THROW
;      Animation     = UIMOB05_SKL.UIMOB05_XXXXXXXXputaway AK and take out bottle
;    End


;    TransitionState = TRANS_THROW TRANS_FIRING_AK
;      Animation     = UIMOB05_SKL.UIMOB05_XXXXXXXXputaway bottle and get AK
;    End





    ;--------------------------------------------------------






    TransitionState = TRANS_Dying TRANS_Flailing
      Animation = UIMOB05_SKL.UIMOB05_A_ADTA1
      Animation = UIMOB05_SKL.UIMOB05_D_ADTA1
      AnimationMode = ONCE
    End

    ConditionState = DYING EXPLODED_FLAILING
      Animation = UIMOB05_SKL.UIMOB05_A_ADTA2
      Animation = UIMOB05_SKL.UIMOB05_D_ADTA2
      AnimationMode = LOOP
      TransitionKey = TRANS_Flailing
    End

    ConditionState = DYING EXPLODED_BOUNCING
      Animation = UIMOB05_SKL.UIMOB05_A_ADTA3
      Animation = UIMOB05_SKL.UIMOB05_D_ADTA3
      AnimationMode = ONCE
      TransitionKey = None
    End


  End

;**** DESIGN parameters ***

  DisplayName      = OBJECT:TankCrew
  Side = GLA
  EditorSorting = INFANTRY
  TransportSlotCount = 1                 ;how many "slots" we take in a transport (0 == not transportable)

  WeaponSet
    Conditions = None 
    Weapon = PRIMARY AmericaOfficerMachineGun
  End

  ArmorSet
    Conditions      = None
    Armor           = HumanArmor
    DamageFX        = InfantryDamageFX
  End

  VisionRange = 150
  ShroudClearingRange = 150
  Prerequisites
    ;Object =
  End
  BuildCost = 100
  BuildTime = 1.0           

  ExperienceValue = 5 5 5 5    ;Experience point value at each level
  ExperienceRequired = 0 150 450 900  ;Experience points needed to gain each level
  IsTrainable = No             ;Can gain experience
  CrushableLevel         = 0  ;What am I?:        0 = for infantry, 1 = for trees, 2 = general vehicles

  CommandSet    = GenericCommandSet

;**** AUDIO Parameters *****************************
  ;VoiceSelect = RPGTrooperVoiceMove
  ;VoiceMove = RPGTrooperVoiceMove
  ;VoiceGuard = RPGTrooperVoiceAttack
  ;VoiceAttack = RPGTrooperVoiceAttack
  ;UnitSpecificSounds
    ;VoiceCreate = RPGTrooperVoiceCreate
  ;End

;**** ENGINEERING Parameters *** ;CREW01
  RadarPriority = UNIT
  KindOf = PRELOAD SELECTABLE CAN_ATTACK ATTACK_NEEDS_LINE_OF_SIGHT CAN_CAST_REFLECTIONS INFANTRY SALVAGER ;IGNORED_IN_GUI

  Body = ActiveBody BodyTag_01
    MaxHealth       = 100.0
    InitialHealth   = 100.0
  End

  Behavior = AIUpdateInterface ModuleTag_03
    AutoAcquireEnemiesWhenIdle = Yes
  End

  Behavior = MobMemberSlavedUpdate ModuleTag_04
    MustCatchUpRadius   = 10
    NoNeedToCatchUpRadius = 5
    Squirrelliness = 0.02
    CatchUpCrisisBailTime = 30; this is in calls to this update, not in frames
  End

  Locomotor = SET_NORMAL AngryMobNormalLocomotor
  Locomotor = SET_WANDER AngryMobWanderLocomotor
  Locomotor = SET_PANIC AngryMobPanicLocomotor

  Behavior = PhysicsBehavior BehaviorTag_01
    Mass = 5.0
  End

  Behavior = SquishCollide ModuleTag_05
    ;nothing
  End


; --- begin Death modules ---
  Behavior = SlowDeathBehavior DeathTag_01
    DeathTypes          = ALL -CRUSHED -SPLATTED -EXPLODED -BURNED -POISONED -POISONED_BETA -POISONED_GAMMA
    SinkDelay           = 3000
    SinkRate            = 0.5     ; in Dist/Sec
    DestructionDelay    = 8000
    FX                  = INITIAL FX_CivilianArabMaleDie
    FX                  = INITIAL FX_BloodyPuddle3
  End
  Behavior = SlowDeathBehavior DeathTag_02
    DeathTypes          = NONE +CRUSHED +SPLATTED
    SinkDelay           = 3000
    SinkRate            = 0.5     ; in Dist/Sec
    DestructionDelay    = 8000
    FX                  = INITIAL FX_GIDieCrushed
    FX                  = INITIAL FX_BloodyPuddle3
  End
  Behavior = SlowDeathBehavior DeathTag_03
    DeathTypes          = NONE +EXPLODED
    SinkDelay           = 3000
    SinkRate            = 0.5     ; in Dist/Sec
    DestructionDelay    = 8000
    FX                  = INITIAL FX_CivilianArabMaleDie
    FX                  = INITIAL FX_BloodyPuddle3
    FlingForce          = 8
    FlingForceVariance  = 3
    FlingPitch          = 60
    FlingPitchVariance  = 10
  End
  Behavior = SlowDeathBehavior DeathTag_04
    DeathTypes          = NONE +BURNED
    DestructionDelay    = 0
    FX                  = INITIAL FX_GIDie
    OCL                 = INITIAL OCL_FlamingInfantry
  End
  Behavior = SlowDeathBehavior ModuleTag_Death05
    DeathTypes          = NONE +POISONED
    DestructionDelay    = 0
    FX                  = INITIAL FX_DieByToxinGLA
    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_DieByToxinGLA
    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_DieByToxinGLA
    OCL                 = INITIAL OCL_ToxicInfantryGamma
  End
; --- end Death modules ---

  Behavior = MaxHealthUpgrade ModuleTag_06
    TriggeredBy   = Upgrade_GLAKevArmor
    AddMaxHealth  = 50.0
    ChangeType    = ADD_CURRENT_HEALTH_TOO   ;Choices are PRESERVE_RATIO, ADD_CURRENT_HEALTH_TOO, and SAME_CURRENTHEALTH
  End

  Behavior = PoisonedBehavior BehaviorTag_02
    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

  Behavior = VeterancyCrateCollide       ModuleTag_07
    RequiredKindOf = VEHICLE      ; we only give our bonus to VEHICLEs we collide with
    ForbiddenKindOf = DOZER       ; but not to TRANSPORTs or DOZERs!
    EffectRange = 0               ; 0=="affect only the thing you collide with"
    AddsOwnerVeterancy = Yes      ; we add our own veterancy to the target (rather than just +1 level)
    IsPilot = Yes                 ; set the pilot flag because it's different than the veterancy crate and has extra checking
  End

  Behavior = AutoFindHealingUpdate   ModuleTag_08 ; This update will have the unit go to a healing station if injured. jba 
    ScanRate = 1000 ; once a second.
    ScanRange = 700 ;
    ;NeverHeal = 0.90 ;  don't heal if we are > 90% healthy.
    AlwaysHeal = 0.40 ; if we get below 40%, find healing right away.
  End

  Behavior = PilotFindVehicleUpdate   ModuleTag_09 ; This update will have the unit go to a vehicle. jba 
    ScanRate = 1000 ; once a second.
    ScanRange = 700 ;
    MinHealth = 0.5 ;  don't enter a vehicle less than 50% healthy.
  End

  Behavior = VeterancyGainCreate ModuleTag_10
    StartingLevel = VETERAN
  End
 
  Geometry = CYLINDER
  GeometryMajorRadius = 4.0 ; very thin
  GeometryHeight = 12.0
  GeometryIsSmall = Yes
  Shadow = SHADOW_DECAL
  ShadowSizeX = 14;
  ShadowSizeY = 14;
  Scale = 0.88
  ShadowTexture = ShadowI;
  BuildCompletion = APPEARS_AT_RALLY_POINT

End

;------------------------------------------------------------------------------
;------------------------------------------------------------------------------
Object GLAInfantryTankCrewman01

;**** ART Parameters ***
  SelectPortrait         = SATankCrew
  ButtonImage            = SATankCrew

  Draw = W3DModelDraw DrawTag_01
    OkToChangeModelColor = Yes

    ; WHILE CARRYING PISTOL
    ;---------------------------------------------------------
    DefaultConditionState ;Idle with Pistol Holstered
      Model = UIMOB01_SKN
      IdleAnimation = UIMOB01_SKL.UIMOB01_IDA1 0 12
      IdleAnimation = UIMOB01_SKL.UIMOB01_IDA2 0 5
      IdleAnimation = UIMOB01_SKL.UIMOB01_CHA  0 5
      IdleAnimation = UIMOB01_SKL.UIMOB01_STA  0 5
      AnimationMode = ONCE
      AnimationSpeedFactorRange 0.9 1.1
      TransitionKey = TRANS_STAND_A

      WeaponFireFXBone = PRIMARY Muzzle
      WeaponMuzzleFlash = PRIMARY MuzzleFX
      WeaponFireFXBone = SECONDARY MuzzleAK
      WeaponMuzzleFlash = SECONDARY MuzzleAKFX
    End

    ; Drawing pistol
    ConditionState  = PREATTACK_A
      Animation     = UIMOB01_SKL.UIMOB01_ATA1_ST ; start firing
      AnimationMode = ONCE
    End
    AliasConditionState = PREATTACK_A FIRING_A
    AliasConditionState = PREATTACK_A BETWEEN_FIRING_SHOTS_A

    ; Firing pistol
    ConditionState = FIRING_A
      Animation = UIMOB01_SKL.UIMOB01_ATA1_LP ; looping firing
      AnimationMode = LOOP
      TransitionKey = TRANS_FIRING_A
    End
    AliasConditionState  = BETWEEN_FIRING_SHOTS_A
    
    ConditionState  = RELOADING_A
      Animation     = UIMOB01_SKL.UIMOB01_ATA1_ED ; end firing
      AnimationMode = ONCE
    End

    ; This transition allows him to put his gun away when he's finished attacking.
    TransitionState = TRANS_FIRING_A TRANS_STAND_A
      Animation     = UIMOB01_SKL.UIMOB01_ATA1_ED ; end firing
      AnimationMode = ONCE
    End

    ConditionState = MOVING
      Animation = UIMOB01_SKL.UIMOB01_RNA 
      AnimationMode = LOOP
      Flags = RANDOMSTART
      TransitionKey   = MOVING
      ParticleSysBone   = None InfantryDustTrails
    End
    AliasConditionState = MOVING RELOADING_A
    AliasConditionState = MOVING PREATTACK_A
    AliasConditionState = MOVING FIRING_A
    AliasConditionState = MOVING BETWEEN_FIRING_SHOTS_A
    AliasConditionState = MOVING RELOADING_C RELOADING_A 
    AliasConditionState = MOVING PREATTACK_C BETWEEN_FIRING_SHOTS_A 

    ConditionState = DYING
      Animation = UIMOB01_SKL.UIMOB01_DA1    
      Animation = UIMOB01_SKL.UIMOB01_DA2
      AnimationMode = ONCE
      TransitionKey = TRANS_Dying
    End


    ConditionState = SPECIAL_CHEERING
      Animation = UIMOB01_SKL.UIMOB01_CHA
      AnimationMode = ONCE
    End

    ;--------------------------------------------------------
    ; TRANSITION FROM PISTOL TO AK47
    TransitionState = TRANS_STAND_A TRANS_STAND_AK
      Animation = UIMOB01_SKL.UIMOB01_TA-D
      AnimationMode = ONCE
    End

    ; WHILE CARRYING AK47 
    ;---------------------------------------------------------
    ConditionState WEAPONSET_PLAYER_UPGRADE ;Idle with AK Slung
      Model = UIMOB01_SKN
      IdleAnimation = UIMOB01_SKL.UIMOB01_IDD1 0 6
      IdleAnimation = UIMOB01_SKL.UIMOB01_IDD2 0 6
      IdleAnimation = UIMOB01_SKL.UIMOB01_CHD  0 6
      IdleAnimation = UIMOB01_SKL.UIMOB01_STD
      AnimationMode = ONCE
      AnimationSpeedFactorRange 0.9 1.1
      TransitionKey = TRANS_STAND_AK
    End

    ConditionState = MOVING WEAPONSET_PLAYER_UPGRADE
      Animation = UIMOB01_SKL.UIMOB01_RND 
      AnimationMode = LOOP
      Flags = RANDOMSTART
      TransitionKey   = MOVING_AK
    End

    ConditionState = DYING WEAPONSET_PLAYER_UPGRADE
      Animation = UIMOB01_SKL.UIMOB01_DD1    
      Animation = UIMOB01_SKL.UIMOB01_DD2
      AnimationMode = ONCE
      TransitionKey = TRANS_Dying
    End

    ConditionState = SPECIAL_CHEERING WEAPONSET_PLAYER_UPGRADE
      Animation = UIMOB01_SKL.UIMOB01_CHD
      AnimationMode = ONCE
    End

    ; Drawing AK47
    ConditionState  = PREATTACK_B WEAPONSET_PLAYER_UPGRADE
      Animation     = UIMOB01_SKL.UIMOB01_ATD1_ST ; start firing
      AnimationMode = ONCE
    End
    AliasConditionState = PREATTACK_B FIRING_B WEAPONSET_PLAYER_UPGRADE
    AliasConditionState = PREATTACK_B BETWEEN_FIRING_SHOTS_B WEAPONSET_PLAYER_UPGRADE

    ; Firing Gun
    ConditionState = FIRING_B WEAPONSET_PLAYER_UPGRADE
      Animation = UIMOB01_SKL.UIMOB01_ATD1_LP ; looping firing
      AnimationMode = LOOP
      WeaponFireFXBone = SECONDARY MuzzleAK
      WeaponMuzzleFlash = SECONDARY MuzzleAKFX
      TransitionKey = TRANS_FIRING_AK
    End
    AliasConditionState  = BETWEEN_FIRING_SHOTS_B WEAPONSET_PLAYER_UPGRADE


    ConditionState  = RELOADING_B WEAPONSET_PLAYER_UPGRADE
      Animation     = UIMOB01_SKL.UIMOB01_ATD1_ED ; end firing
      AnimationMode = ONCE
    End


    ; This transition allows him to put his gun away when he's finished attacking.
    TransitionState = TRANS_FIRING_AK TRANS_STAND_AK
      Animation     = UIMOB01_SKL.UIMOB01_ATD1_ED ; end firing
      AnimationMode = ONCE
    End

;    ;Throwing bottle----------------------------------------------------------------
;    ConditionState = PREATTACK_C 
;      Animation     = UIMOB01_SKL.UIMOB01_ATCA_BF ; the wind up
;    End
;    AliasConditionState = PREATTACK_C FIRING_A
;    AliasConditionState = PREATTACK_C RELOADING_A
;    AliasConditionState = PREATTACK_C BETWEEN_FIRING_SHOTS_A 
;
;    ConditionState = FIRING_C 
;      Animation     = UIMOB01_SKL.UIMOB01_ATCA_AF ; the release and follow-thru
;      TransitionKey = TRANS_THROW
;    End
;    AliasConditionState = FIRING_C BETWEEN_FIRING_SHOTS_A
;
;    ConditionState RELOADING_C
;      Animation =UIMOB01_SKL.UIMOB01_IDA1
;      WaitForStateToFinishIfPossible = TRANS_THROW ; universal hub for follow-thru
;    End
;    AliasConditionState = RELOADING_C RELOADING_A
;    AliasConditionState = RELOADING_C FIRING_A
;    AliasConditionState = RELOADING_C BETWEEN_FIRING_SHOTS_A


;    TransitionState = TRANSXXX TRANS_THROW
;      Animation     = UIMOB01_SKL.UIMOB01_XXXXXXXXputaway gun and take out bottle
;    End

;    TransitionState = TRANS_THROW TRANS_FIRING_A
;      Animation     = UIMOB01_SKL.UIMOB01_XXXXXXXXputaway bottle and get PISTOL
;    End

;    TransitionState = TRANSXXXAK TRANS_THROW
;      Animation     = UIMOB01_SKL.UIMOB01_XXXXXXXXputaway AK and take out bottle
;    End

;    TransitionState = TRANS_THROW TRANS_FIRING_AK
;      Animation     = UIMOB01_SKL.UIMOB01_XXXXXXXXputaway bottle and get AK
;    End

    ;--------------------------------------------------------

    TransitionState = TRANS_Dying TRANS_Flailing
      Animation = UIMOB01_SKL.UIMOB01_A_ADTE1
      Animation = UIMOB01_SKL.UIMOB01_D_ADTE1
      AnimationMode = ONCE
    End

    ConditionState = DYING EXPLODED_FLAILING
      Animation = UIMOB01_SKL.UIMOB01_A_ADTE2
      Animation = UIMOB01_SKL.UIMOB01_D_ADTE2
      AnimationMode = LOOP
      TransitionKey = TRANS_Flailing
    End

    ConditionState = DYING EXPLODED_BOUNCING
      Animation = UIMOB01_SKL.UIMOB01_A_ADTE3
      Animation = UIMOB01_SKL.UIMOB01_D_ADTE3
      AnimationMode = ONCE
      TransitionKey = None
    End
  End


;**** DESIGN parameters ***

  DisplayName      = OBJECT:TankCrew
  Side = GLA
  EditorSorting = INFANTRY
  TransportSlotCount = 1                 ;how many "slots" we take in a transport (0 == not transportable)

  WeaponSet
    Conditions = None 
    Weapon = PRIMARY GLAAngryMobAK47Weapon
    AutoChooseSources   = PRIMARY     FROM_PLAYER FROM_SCRIPT FROM_AI
  End
  WeaponSet
    Conditions = PLAYER_UPGRADE 
    Weapon = PRIMARY GLAAngryMobAK47Weapon
    Weapon = SECONDARY RebelGrenade
    AutoChooseSources   = PRIMARY     FROM_PLAYER FROM_SCRIPT FROM_AI
    AutoChooseSources   = SECONDARY   FROM_PLAYER FROM_SCRIPT FROM_AI
  End

  ArmorSet
    Conditions      = None
    Armor           = HumanArmor
    DamageFX        = InfantryDamageFX
  End

  VisionRange = 150
  ShroudClearingRange = 150
  Prerequisites
    ;Object =
  End
  BuildCost = 100
  BuildTime = 1.0           

  ExperienceValue = 5 5 5 5    ;Experience point value at each level
  ExperienceRequired = 0 150 450 900  ;Experience points needed to gain each level
  IsTrainable = No             ;Can gain experience
  CrushableLevel         = 0  ;What am I?:        0 = for infantry, 1 = for trees, 2 = general vehicles

  CommandSet    = GenericCommandSet

;**** AUDIO Parameters *****************************
  ;VoiceSelect = RPGTrooperVoiceMove
  ;VoiceMove = RPGTrooperVoiceMove
  ;VoiceGuard = RPGTrooperVoiceAttack
  ;VoiceAttack = RPGTrooperVoiceAttack
  ;UnitSpecificSounds
    ;VoiceCreate = RPGTrooperVoiceCreate
  ;End

;**** ENGINEERING Parameters *** ;CREW02
  RadarPriority = UNIT
  KindOf = PRELOAD SELECTABLE CAN_ATTACK ATTACK_NEEDS_LINE_OF_SIGHT CAN_CAST_REFLECTIONS INFANTRY ;IGNORED_IN_GUI

  Body = ActiveBody BodyTag_01
    MaxHealth       = 80.0
    InitialHealth   = 80.0
  End

  Behavior = AIUpdateInterface ModuleTag_03
    AutoAcquireEnemiesWhenIdle = Yes
  End

  Behavior = MobMemberSlavedUpdate ModuleTag_04
    MustCatchUpRadius   = 10
    NoNeedToCatchUpRadius = 5
    Squirrelliness = 0.03
    CatchUpCrisisBailTime = 30; this is in calls to this update, not in frames
  End

  Locomotor = SET_NORMAL AngryMobNormalLocomotor
  Locomotor = SET_WANDER AngryMobWanderLocomotor
  Locomotor = SET_PANIC AngryMobPanicLocomotor

  Behavior = PhysicsBehavior BehaviorTag_01
    Mass = 5.0
  End

  Behavior = SquishCollide ModuleTag_05
    ;nothing
  End


; --- begin Death modules ---
  Behavior = SlowDeathBehavior DeathTag_01
    DeathTypes          = ALL -CRUSHED -SPLATTED -EXPLODED -BURNED -POISONED -POISONED_BETA -POISONED_GAMMA
    SinkDelay           = 3000
    SinkRate            = 0.5     ; in Dist/Sec
    DestructionDelay    = 8000
    FX                  = INITIAL FX_CivilianArabMaleDie
    FX                  = INITIAL FX_BloodyPuddle3
  End
  Behavior = SlowDeathBehavior DeathTag_02
    DeathTypes          = NONE +CRUSHED +SPLATTED
    SinkDelay           = 3000
    SinkRate            = 0.5     ; in Dist/Sec
    DestructionDelay    = 8000
    FX                  = INITIAL FX_GIDieCrushed
    FX                  = INITIAL FX_BloodyPuddle3
  End
  Behavior = SlowDeathBehavior DeathTag_03
    DeathTypes          = NONE +EXPLODED
    SinkDelay           = 3000
    SinkRate            = 0.5     ; in Dist/Sec
    DestructionDelay    = 8000
    FX                  = INITIAL FX_CivilianArabMaleDie
    FX                  = INITIAL FX_BloodyPuddle3
    FlingForce          = 8
    FlingForceVariance  = 3
    FlingPitch          = 60
    FlingPitchVariance  = 10
  End
  Behavior = SlowDeathBehavior DeathTag_04
    DeathTypes          = NONE +BURNED
    DestructionDelay    = 0
    FX                  = INITIAL FX_GIDie
    OCL                 = INITIAL OCL_FlamingInfantry
  End
  Behavior = SlowDeathBehavior ModuleTag_Death05
    DeathTypes          = NONE +POISONED
    DestructionDelay    = 0
    FX                  = INITIAL FX_DieByToxinGLA
    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_DieByToxinGLA
    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_DieByToxinGLA
    OCL                 = INITIAL OCL_ToxicInfantryGamma
  End
; --- end Death modules ---

  Behavior = WeaponSetUpgrade ModuleTag_06
    TriggeredBy = Upgrade_GLAMolotovCocktail
  End

  Behavior = MaxHealthUpgrade ModuleTag_07
    TriggeredBy   = Upgrade_GLAKevArmor
    AddMaxHealth  = 50.0
    ChangeType    = ADD_CURRENT_HEALTH_TOO   ;Choices are PRESERVE_RATIO, ADD_CURRENT_HEALTH_TOO, and SAME_CURRENTHEALTH
  End

  Behavior = PoisonedBehavior BehaviorTag_02
    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

  Behavior = VeterancyCrateCollide       ModuleTag_08
    RequiredKindOf = VEHICLE      ; we only give our bonus to VEHICLEs we collide with
    ForbiddenKindOf = DOZER       ; but not to TRANSPORTs or DOZERs!
    EffectRange = 0               ; 0=="affect only the thing you collide with"
    AddsOwnerVeterancy = Yes      ; we add our own veterancy to the target (rather than just +1 level)
    IsPilot = Yes                 ; set the pilot flag because it's different than the veterancy crate and has extra checking
  End

  Behavior = AutoFindHealingUpdate   ModuleTag_09 ; This update will have the unit go to a healing station if injured. jba 
    ScanRate = 1000 ; once a second.
    ScanRange = 700 ;
    ;NeverHeal = 0.90 ;  don't heal if we are > 90% healthy.
    AlwaysHeal = 0.40 ; if we get below 40%, find healing right away.
  End

  Behavior = PilotFindVehicleUpdate   ModuleTag_10 ; This update will have the unit go to a vehicle. jba 
    ScanRate = 1000 ; once a second.
    ScanRange = 700 ;
    MinHealth = 0.5 ;  don't enter a vehicle less than 50% healthy.
  End

  ;Behavior = VeterancyGainCreate ModuleTag_11
    ;StartingLevel = VETERAN
  ;End
 
  Geometry = CYLINDER
  GeometryMajorRadius = 4.0 ; very thin
  GeometryHeight = 12.0
  GeometryIsSmall = Yes
  Shadow = SHADOW_DECAL
  ShadowSizeX = 14;
  ShadowSizeY = 14;
  Scale = 0.88
  ShadowTexture = ShadowI;
  BuildCompletion = APPEARS_AT_RALLY_POINT

End

;------------------------------------------------------------------------------
;------------------------------------------------------------------------------
Object GLAInfantryTankCrewman02 ;object reskin

;**** ART Parameters ***
  SelectPortrait         = SATankCrew
  ButtonImage            = SATankCrew

  Draw = W3DModelDraw DrawTag_01
    OkToChangeModelColor = Yes

    ; WHILE CARRYING PISTOL
    ;---------------------------------------------------------
     DefaultConditionState ;Idle with Pistol Holstered
      Model = UIMOB03_SKN
      IdleAnimation = UIMOB03_SKL.UIMOB03_IDA1 0 12
      ;IdleAnimation = UIMOB03_SKL.UIMOB03_IDA2 0 5
      ;IdleAnimation = UIMOB03_SKL.UIMOB03_CHA  0 5
      ;IdleAnimation = UIMOB03_SKL.UIMOB03_STA  0 5
      AnimationMode = ONCE
      AnimationSpeedFactorRange 0.9 1.1
      TransitionKey = TRANS_STAND_A

      WeaponFireFXBone = PRIMARY Muzzle
      WeaponMuzzleFlash = PRIMARY MuzzleFX
      WeaponFireFXBone = SECONDARY MuzzleAK
      WeaponMuzzleFlash = SECONDARY MuzzleAKFX
      WeaponFireFXBone = TERTIARY "UIMOB03 R HAND"
    End

    ; Drawing pistol
    ConditionState  = PREATTACK_A
      Animation     = UIMOB03_SKL.UIMOB03_ATA1_ST ; start firing
      AnimationMode = ONCE
    End
    AliasConditionState = PREATTACK_A FIRING_A
    AliasConditionState = PREATTACK_A BETWEEN_FIRING_SHOTS_A

    ; Firing pistol
    ConditionState = FIRING_A
      Animation = UIMOB03_SKL.UIMOB03_ATA1_LP ; looping firing
      AnimationMode = LOOP
      TransitionKey = TRANS_FIRING_A
    End
    AliasConditionState  = BETWEEN_FIRING_SHOTS_A

    ConditionState  = RELOADING_A
      Animation     = UIMOB03_SKL.UIMOB03_ATA1_ED ; end firing
      AnimationMode = ONCE
    End

    ; This transition allows him to put his gun away when he's finished attacking.
    TransitionState = TRANS_FIRING_A TRANS_STAND_A
      Animation     = UIMOB03_SKL.UIMOB03_ATA1_ED ; end firing
      AnimationMode = ONCE
    End

    ConditionState = MOVING
      Animation = UIMOB03_SKL.UIMOB03_RNA 
      AnimationMode = LOOP
      Flags = RANDOMSTART
      TransitionKey   = MOVING
      ParticleSysBone   = None InfantryDustTrails
    End
    AliasConditionState = MOVING RELOADING_A
    AliasConditionState = MOVING PREATTACK_A
    AliasConditionState = MOVING FIRING_A
    AliasConditionState = MOVING BETWEEN_FIRING_SHOTS_A
    AliasConditionState = MOVING RELOADING_C RELOADING_A 
    AliasConditionState = MOVING PREATTACK_C BETWEEN_FIRING_SHOTS_A 

    ConditionState = DYING
      Animation = UIMOB03_SKL.UIMOB03_DA1    
      Animation = UIMOB03_SKL.UIMOB03_DA2
      AnimationMode = ONCE
      TransitionKey = TRANS_Dying
    End


    ConditionState = SPECIAL_CHEERING
      Animation = UIMOB03_SKL.UIMOB03_CHA
      AnimationMode = ONCE
    End

    ;--------------------------------------------------------
    ; TRANSITION FROM PISTOL TO AK47
    TransitionState = TRANS_STAND_A TRANS_STAND_AK
      Animation = UIMOB03_SKL.UIMOB03_TA-D
      AnimationMode = ONCE
    End


    ; WHILE CARRYING AK47 
    ;---------------------------------------------------------
    ConditionState WEAPONSET_PLAYER_UPGRADE ;Idle with AK Slung
      Model = UIMOB03_SKN
      IdleAnimation = UIMOB03_SKL.UIMOB03_IDD1 0 6
      IdleAnimation = UIMOB03_SKL.UIMOB03_IDD2 0 6
      IdleAnimation = UIMOB03_SKL.UIMOB03_CHD  0 6
      IdleAnimation = UIMOB03_SKL.UIMOB03_STD
      AnimationMode = ONCE
      AnimationSpeedFactorRange 0.9 1.1
      TransitionKey = TRANS_STAND_AK
    End

    ConditionState = MOVING WEAPONSET_PLAYER_UPGRADE
      Animation = UIMOB03_SKL.UIMOB03_RND 
      AnimationMode = LOOP
      Flags = RANDOMSTART
      TransitionKey   = MOVING_AK
    End

    ConditionState = DYING WEAPONSET_PLAYER_UPGRADE
      Animation = UIMOB03_SKL.UIMOB03_DD1    
      Animation = UIMOB03_SKL.UIMOB03_DD2
      AnimationMode = ONCE
      TransitionKey = TRANS_Dying
    End

    ConditionState = SPECIAL_CHEERING WEAPONSET_PLAYER_UPGRADE
      Animation = UIMOB03_SKL.UIMOB03_CHD
      AnimationMode = ONCE
    End

    ; Drawing AK47
    ConditionState  = PREATTACK_B WEAPONSET_PLAYER_UPGRADE
      Animation     = UIMOB03_SKL.UIMOB03_ATD_ST ; start firing
      AnimationMode = ONCE
    End
    AliasConditionState = PREATTACK_B FIRING_B WEAPONSET_PLAYER_UPGRADE
    AliasConditionState = PREATTACK_B BETWEEN_FIRING_SHOTS_B WEAPONSET_PLAYER_UPGRADE

    ; Firing Gun
    ConditionState = FIRING_B WEAPONSET_PLAYER_UPGRADE
      Animation = UIMOB03_SKL.UIMOB03_ATD_LP ; looping firing
      AnimationMode = LOOP
      WeaponFireFXBone = SECONDARY MuzzleAK
      WeaponMuzzleFlash = SECONDARY MuzzleAKFX
      TransitionKey = TRANS_FIRING_AK
    End
    AliasConditionState  = BETWEEN_FIRING_SHOTS_B WEAPONSET_PLAYER_UPGRADE


    ConditionState  = RELOADING_B WEAPONSET_PLAYER_UPGRADE
      Animation     = UIMOB03_SKL.UIMOB03_ATD_ED ; end firing
      AnimationMode = ONCE
    End


    ; This transition allows him to put his gun away when he's finished attacking.
    TransitionState = TRANS_FIRING_AK TRANS_STAND_AK
      Animation     = UIMOB03_SKL.UIMOB03_ATD_ED ; end firing
      AnimationMode = ONCE
    End


;    ;Throwing bottle----------------------------------------------------------------
;    ConditionState = PREATTACK_C 
;      Animation     = UIMOB03_SKL.UIMOB03_ATCA_BF ; the wind up
;    End
;    AliasConditionState = PREATTACK_C FIRING_A
;    AliasConditionState = PREATTACK_C RELOADING_A
;    AliasConditionState = PREATTACK_C BETWEEN_FIRING_SHOTS_A 
;
;    ConditionState = FIRING_C 
;      Animation     = UIMOB03_SKL.UIMOB03_ATCA_AF ; the release and follow-thru
;      TransitionKey = TRANS_THROW
;    End
;    AliasConditionState = FIRING_C BETWEEN_FIRING_SHOTS_A
;
;    ConditionState RELOADING_C
;      Animation =UIMOB03_SKL.UIMOB03_IDA1
;      WaitForStateToFinishIfPossible = TRANS_THROW ; universal hub for follow-thru
;
;    End
;    AliasConditionState = RELOADING_C RELOADING_A
;    AliasConditionState = RELOADING_C FIRING_A
;    AliasConditionState = RELOADING_C BETWEEN_FIRING_SHOTS_A


;    TransitionState = TRANSXXX TRANS_THROW
;      Animation     = UIMOB03_SKL.UIMOB03_XXXXXXXXputaway gun and take out bottle
;    End

;    TransitionState = TRANS_THROW TRANS_FIRING_A
;      Animation     = UIMOB03_SKL.UIMOB03_XXXXXXXXputaway bottle and get PISTOL
;    End

;    TransitionState = TRANSXXXAK TRANS_THROW
;      Animation     = UIMOB03_SKL.UIMOB03_XXXXXXXXputaway AK and take out bottle
;    End

;    TransitionState = TRANS_THROW TRANS_FIRING_AK
;      Animation     = UIMOB03_SKL.UIMOB03_XXXXXXXXputaway bottle and get AK
;    End





    ;--------------------------------------------------------






    TransitionState = TRANS_Dying TRANS_Flailing
      Animation = UIMOB03_SKL.UIMOB03_A_ADTD1
      Animation = UIMOB03_SKL.UIMOB03_D_ADTD1
      AnimationMode = ONCE
    End

    ConditionState = DYING EXPLODED_FLAILING
      Animation = UIMOB03_SKL.UIMOB03_A_ADTD2
      Animation = UIMOB03_SKL.UIMOB03_D_ADTD2
      AnimationMode = LOOP
      TransitionKey = TRANS_Flailing
    End

    ConditionState = DYING EXPLODED_BOUNCING
      Animation = UIMOB03_SKL.UIMOB03_A_ADTD3
      Animation = UIMOB03_SKL.UIMOB03_D_ADTD3
      AnimationMode = ONCE
      TransitionKey = None
    End


  End

;**** DESIGN parameters ***

  DisplayName      = OBJECT:TankCrew
  Side = GLA
  EditorSorting = INFANTRY
  TransportSlotCount = 1                 ;how many "slots" we take in a transport (0 == not transportable)

  WeaponSet
    Conditions = None 
    Weapon = PRIMARY GLAAngryMobAK47Weapon
    AutoChooseSources   = PRIMARY     FROM_PLAYER FROM_SCRIPT FROM_AI
  End
  WeaponSet
    Conditions = PLAYER_UPGRADE 
    Weapon = PRIMARY GLAAngryMobAK47Weapon
    Weapon = SECONDARY RebelGrenade
    AutoChooseSources   = PRIMARY     FROM_PLAYER FROM_SCRIPT FROM_AI
    AutoChooseSources   = SECONDARY   FROM_PLAYER FROM_SCRIPT FROM_AI
  End

  ArmorSet
    Conditions      = None
    Armor           = HumanArmor
    DamageFX        = InfantryDamageFX
  End

  VisionRange = 150
  ShroudClearingRange = 150
  Prerequisites
    ;Object =
  End
  BuildCost = 100
  BuildTime = 1.0           

  ExperienceValue = 5 5 5 5    ;Experience point value at each level
  ExperienceRequired = 0 150 450 900  ;Experience points needed to gain each level
  IsTrainable = No             ;Can gain experience
  CrushableLevel         = 0  ;What am I?:        0 = for infantry, 1 = for trees, 2 = general vehicles

  CommandSet    = GenericCommandSet

;**** AUDIO Parameters *****************************
  ;VoiceSelect = RPGTrooperVoiceMove
  ;VoiceMove = RPGTrooperVoiceMove
  ;VoiceGuard = RPGTrooperVoiceAttack
  ;VoiceAttack = RPGTrooperVoiceAttack
  ;UnitSpecificSounds
    ;VoiceCreate = RPGTrooperVoiceCreate
  ;End

;**** ENGINEERING Parameters *** ;CREW03
  RadarPriority = UNIT
  KindOf = PRELOAD SELECTABLE CAN_ATTACK ATTACK_NEEDS_LINE_OF_SIGHT CAN_CAST_REFLECTIONS INFANTRY ;IGNORED_IN_GUI

  Body = ActiveBody BodyTag_01
    MaxHealth       = 80.0
    InitialHealth   = 80.0
  End

  Behavior = AIUpdateInterface ModuleTag_03
    AutoAcquireEnemiesWhenIdle = Yes
  End

  Behavior = MobMemberSlavedUpdate ModuleTag_04
    MustCatchUpRadius   = 10
    NoNeedToCatchUpRadius = 5
    Squirrelliness = 0.03
    CatchUpCrisisBailTime = 30; this is in calls to this update, not in frames
  End

  Locomotor = SET_NORMAL AngryMobNormalLocomotor
  Locomotor = SET_WANDER AngryMobWanderLocomotor
  Locomotor = SET_PANIC AngryMobPanicLocomotor

  Behavior = PhysicsBehavior BehaviorTag_01
    Mass = 5.0
  End

  Behavior = SquishCollide ModuleTag_05
    ;nothing
  End


; --- begin Death modules ---
  Behavior = SlowDeathBehavior DeathTag_01
    DeathTypes          = ALL -CRUSHED -SPLATTED -EXPLODED -BURNED -POISONED -POISONED_BETA -POISONED_GAMMA
    SinkDelay           = 3000
    SinkRate            = 0.5     ; in Dist/Sec
    DestructionDelay    = 8000
    FX                  = INITIAL FX_CivilianArabMaleDie
    FX                  = INITIAL FX_BloodyPuddle3
  End
  Behavior = SlowDeathBehavior DeathTag_02
    DeathTypes          = NONE +CRUSHED +SPLATTED
    SinkDelay           = 3000
    SinkRate            = 0.5     ; in Dist/Sec
    DestructionDelay    = 8000
    FX                  = INITIAL FX_GIDieCrushed
    FX                  = INITIAL FX_BloodyPuddle3
  End
  Behavior = SlowDeathBehavior DeathTag_03
    DeathTypes          = NONE +EXPLODED
    SinkDelay           = 3000
    SinkRate            = 0.5     ; in Dist/Sec
    DestructionDelay    = 8000
    FX                  = INITIAL FX_CivilianArabMaleDie
    FX                  = INITIAL FX_BloodyPuddle3
    FlingForce          = 8
    FlingForceVariance  = 3
    FlingPitch          = 60
    FlingPitchVariance  = 10
  End
  Behavior = SlowDeathBehavior DeathTag_04
    DeathTypes          = NONE +BURNED
    DestructionDelay    = 0
    FX                  = INITIAL FX_GIDie
    OCL                 = INITIAL OCL_FlamingInfantry
  End
  Behavior = SlowDeathBehavior ModuleTag_Death05
    DeathTypes          = NONE +POISONED
    DestructionDelay    = 0
    FX                  = INITIAL FX_DieByToxinGLA
    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_DieByToxinGLA
    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_DieByToxinGLA
    OCL                 = INITIAL OCL_ToxicInfantryGamma
  End
; --- end Death modules ---

  Behavior = WeaponSetUpgrade ModuleTag_06
    TriggeredBy = Upgrade_GLAMolotovCocktail
  End

  Behavior = MaxHealthUpgrade ModuleTag_07
    TriggeredBy   = Upgrade_GLAKevArmor
    AddMaxHealth  = 50.0
    ChangeType    = ADD_CURRENT_HEALTH_TOO   ;Choices are PRESERVE_RATIO, ADD_CURRENT_HEALTH_TOO, and SAME_CURRENTHEALTH
  End

  Behavior = PoisonedBehavior BehaviorTag_02
    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

  Behavior = WeaponSetUpgrade UpgradeTag_01
    TriggeredBy = Upgrade_GLAArmTheMob
  End

  Behavior = VeterancyCrateCollide       ModuleTag_08
    RequiredKindOf = VEHICLE      ; we only give our bonus to VEHICLEs we collide with
    ForbiddenKindOf = DOZER       ; but not to TRANSPORTs or DOZERs!
    EffectRange = 0               ; 0=="affect only the thing you collide with"
    AddsOwnerVeterancy = Yes      ; we add our own veterancy to the target (rather than just +1 level)
    IsPilot = Yes                 ; set the pilot flag because it's different than the veterancy crate and has extra checking
  End

  Behavior = AutoFindHealingUpdate   ModuleTag_09 ; This update will have the unit go to a healing station if injured. jba 
    ScanRate = 1000 ; once a second.
    ScanRange = 700 ;
    ;NeverHeal = 0.90 ;  don't heal if we are > 90% healthy.
    AlwaysHeal = 0.40 ; if we get below 40%, find healing right away.
  End

  Behavior = PilotFindVehicleUpdate   ModuleTag_10 ; This update will have the unit go to a vehicle. jba 
    ScanRate = 1000 ; once a second.
    ScanRange = 700 ;
    MinHealth = 0.5 ;  don't enter a vehicle less than 50% healthy.
  End

  ;Behavior = VeterancyGainCreate ModuleTag_11
    ;StartingLevel = VETERAN
  ;End
 
  Geometry = CYLINDER
  GeometryMajorRadius = 4.0 ; very thin
  GeometryHeight = 12.0
  GeometryIsSmall = Yes
  Shadow = SHADOW_DECAL
  ShadowSizeX = 14;
  ShadowSizeY = 14;
  Scale = 0.88
  ShadowTexture = ShadowI;
  BuildCompletion = APPEARS_AT_RALLY_POINT

End