View Single Post
Old 07-09-2003, 12:57 PM   #1 (permalink)
Malc
Senior Member
 
Join Date: Feb 2003
Location: UK
Posts: 164
Default Help With Overlord Type Upgrades

Ok, ive got a infantry unit and im trying to upgrade it like you do a overlord, so the infantry unit can be upgraded to have a sniperrifle, rocket launcher etc. But I keep on getting a technical error when I start the game the releasecrashinfo.txt gives no details not even a reg dump. Heres my code.

FactionUnit
Code:
;------------------------------------------------------------------------------
Object UKSAS
  ; *** ART Parameters ***
  SelectPortrait         = UKSAS
  ButtonImage            = UKSAS

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

    Draw = W3DModelDraw ModuleTag_01
  OkToChangeModelColor = Yes

    ; idle
    DefaultConditionState
      Model               = AIHERO_SKN2
      IdleAnimation       = AIHERO_SKL.AIHERO_STA 0 25
      IdleAnimation       = AIHERO_SKL.AIHERO_IDA
      IdleAnimation       = AIHERO_SKL.AIHERO_IDB
      AnimationMode       = ONCE
      TransitionKey       = TRANS_Stand
      WeaponFireFXBone    = PRIMARY Muzzle
      WeaponMuzzleFlash   = PRIMARY MuzzleFX
      WeaponMuzzleFlash   = SECONDARY NONE
      HideSubObject     = MUZZLEFX01
    End


    ; injured idle
    ConditionState        = REALLYDAMAGED
      IdleAnimation       = AIHERO_SKL.AIHERO_ISTA 0 30
      IdleAnimation       = AIHERO_SKL.AIHERO_IIDA
      IdleAnimation       = AIHERO_SKL.AIHERO_IIDB
      AnimationMode       = ONCE
      TransitionKey       = TRANS_StandInjured
    End


    TransitionState     = TRANS_Stand TRANS_StandInjured
      Animation         = AIHERO_SKL.AIHERO_ISTAHIT
      AnimationMode     = ONCE
    End

    ; moving
    ConditionState        = MOVING
      Animation           = AIHERO_SKL.AIHERO_RNA 26
      AnimationMode       = LOOP
      Flags               = RANDOMSTART
      TransitionKey       = TRANS_Walking
      ParticleSysBone     = None InfantryDustTrails
      HideSubObject     = MUZZLEFX01
    End
    AliasConditionState = MOVING FIRING_A
    AliasConditionState = MOVING BETWEEN_FIRING_SHOTS_A
    AliasConditionState = MOVING RELOADING_A
    AliasConditionState = MOVING FIRING_B
    AliasConditionState = MOVING BETWEEN_FIRING_SHOTS_B
    AliasConditionState = MOVING RELOADING_B

    ; injured moving
    ConditionState     = MOVING REALLYDAMAGED
      Animation        = AIHERO_SKL.AIHERO_IRNA 26
      AnimationMode    = LOOP
      Flags            = RANDOMSTART
      TransitionKey    = TRANS_WalkingInjured
      ParticleSysBone  = None InfantryDustTrails
      HideSubObject     = MUZZLEFX01
    End
    AliasConditionState = MOVING FIRING_A REALLYDAMAGED
    AliasConditionState = MOVING BETWEEN_FIRING_SHOTS_A REALLYDAMAGED
    AliasConditionState = MOVING RELOADING_A REALLYDAMAGED
    AliasConditionState = MOVING FIRING_B REALLYDAMAGED
    AliasConditionState = MOVING BETWEEN_FIRING_SHOTS_B REALLYDAMAGED
    AliasConditionState = MOVING RELOADING_B REALLYDAMAGED

    ; Firing animation
    ConditionState      = FIRING_A
      Animation         = AIHERO_SKL.AIHERO_ATA
      AnimationMode     = ONCE
      AnimationSpeedFactorRange = 1.5 1.5
      TransitionKey     = TRANS_FiringA
    End

    ConditionState      = BETWEEN_FIRING_SHOTS_A
      Animation         = AIHERO_SKL.AIHERO_ATA
      AnimationMode     = MANUAL
      Flags             = START_FRAME_LAST
      WaitForStateToFinishIfPossible = TRANS_FiringA
    End
    AliasConditionState = RELOADING_A

    ; Injured Firing animation
    ConditionState      = FIRING_A REALLYDAMAGED
      Animation         = AIHERO_SKL.AIHERO_IATA
      AnimationMode     = ONCE
      AnimationSpeedFactorRange = 1.5 1.5
      TransitionKey     = TRANS_FiringAInjured
    End

    ConditionState      = BETWEEN_FIRING_SHOTS_A REALLYDAMAGED
      Animation         = AIHERO_SKL.AIHERO_IATA
      AnimationMode     = MANUAL
      Flags             = START_FRAME_LAST
      WaitForStateToFinishIfPossible = TRANS_FiringAInjured
    End
    AliasConditionState = RELOADING_A REALLYDAMAGED

    TransitionState     = TRANS_FiringA TRANS_FiringAInjured
      Animation         = AIHERO_SKL.AIHERO_IATAHIT
      AnimationMode     = ONCE
    End

    ; Placing charge animation
    ConditionState      = UNPACKING
      Animation         = AIHERO_SKL.AIHERO_ATB1
      AnimationMode     = ONCE
    End
    AliasConditionState = MOVING UNPACKING

    ; Injured Placing charge animation
    ConditionState      = UNPACKING REALLYDAMAGED
      Animation         = AIHERO_SKL.AIHERO_IATB1
      AnimationMode     = ONCE
    End
    AliasConditionState = MOVING UNPACKING REALLYDAMAGED

    ; Stab animations
    ConditionState      = PREATTACK_B
      Animation         = AIHERO_SKL.AIHERO_ATC
      AnimationMode     = ONCE
      TransitionKey     = TRANS_Stabbing
      HideSubObject     = MUZZLEFX01
    End
    AliasConditionState = PREATTACK_B MOVING
    AliasConditionState = PREATTACK_B FIRING_B
    AliasConditionState = PREATTACK_B BETWEEN_FIRING_SHOTS_B

    ConditionState      = FIRING_B
      Animation         = AIHERO_SKL.AIHERO_ATC
      AnimationMode     = MANUAL
      Flags             = START_FRAME_LAST
      TransitionKey     = TRANS_Stabbing
      HideSubObject     = MUZZLEFX01
    End
    AliasConditionState = BETWEEN_FIRING_SHOTS_B
    AliasConditionState = RELOADING_B

    TransitionState     = TRANS_Stabbing TRANS_Stand
      Animation         = AIHERO_SKL.AIHERO_ATC2
      AnimationMode     = ONCE
    End

    ; Injured Stab animations
    ConditionState      = PREATTACK_B REALLYDAMAGED
      Animation         = AIHERO_SKL.AIHERO_IATC1
      AnimationMode     = ONCE
      TransitionKey     = TRANS_StabbingInjured
      HideSubObject     = MUZZLEFX01
    End
    AliasConditionState = PREATTACK_B MOVING REALLYDAMAGED
    AliasConditionState = PREATTACK_B FIRING_B REALLYDAMAGED
    AliasConditionState = PREATTACK_B BETWEEN_FIRING_SHOTS_B REALLYDAMAGED

    ConditionState      = FIRING_B REALLYDAMAGED
      Animation         = AIHERO_SKL.AIHERO_IATC2
      AnimationMode     = MANUAL
      Flags             = START_FRAME_LAST
      TransitionKey     = TRANS_StabbingInjured
      HideSubObject     = MUZZLEFX01
    End
    AliasConditionState = BETWEEN_FIRING_SHOTS_B REALLYDAMAGED
    AliasConditionState = RELOADING_B REALLYDAMAGED

    TransitionState     = TRANS_StabbingInjured TRANS_StandInjured
      Animation         = AIHERO_SKL.AIHERO_IATC2
      AnimationMode     = ONCE
    End

    ; cheering
    ConditionState      = SPECIAL_CHEERING
      Animation         = AIHERO_SKL.AIHERO_CHA
      AnimationMode     = ONCE
    End

    ; injured cheering
    ConditionState      = SPECIAL_CHEERING REALLYDAMAGED
      Animation         = AIHERO_SKL.AIHERO_ICHA
      AnimationMode     = ONCE
    End

    ; climbing
    ConditionState      = CLIMBING
      Animation         = AIHERO_SKL.AIHERO_CLMID
      AnimationMode     = LOOP
      TransitionKey     = TRANS_Climbing
    End
    AliasConditionState = RAPPELLING
    AliasConditionState = CLIMBING REALLYDAMAGED
    AliasConditionState = RAPPELLING REALLYDAMAGED

    ConditionState      = CLIMBING MOVING
      Animation         = AIHERO_SKL.AIHERO_CLMUP
      AnimationMode     = LOOP
      TransitionKey     = TRANS_Climbing
    End
    AliasConditionState = CLIMBING MOVING REALLYDAMAGED

    ConditionState      = RAPPELLING MOVING
      Animation         = AIHERO_SKL.AIHERO_CLMUP
      AnimationMode     = LOOP_BACKWARDS
      TransitionKey     = TRANS_Climbing
    End
    AliasConditionState = RAPPELLING MOVING REALLYDAMAGED

; these transitions don't really work well with our code. leave 'em out.
;    TransitionState     = TRANS_Climbing TRANS_Stand
;      Animation         = AIHERO_SKL.AIHERO_CLMST
;      AnimationMode     = ONCE
;    End
;
;    TransitionState     = TRANS_Stand TRANS_Climbing
;      Animation         = AIHERO_SKL.AIHERO_CLMST
;      AnimationMode     = ONCE_BACKWARDS
;    End

    ; dying anims
    ConditionState      = DYING
      Animation         = AIHERO_SKL.AIHERO_DTA
      Animation         = AIHERO_SKL.AIHERO_DTB
      Animation         = AIHero_SKL.AIHero_IDTA
      Animation         = AIHero_SKL.AIHero_IDTB
      AnimationMode     = ONCE
      TransitionKey     = TRANS_Dying
    End
    AliasConditionState = RAPPELLING DYING
    AliasConditionState = CLIMBING DYING

    TransitionState     = TRANS_Dying TRANS_Flailing
      Animation         = AIHERO_SKL.AIHERO_ADTG21
      AnimationMode     = ONCE
    End

    ConditionState      = DYING EXPLODED_FLAILING
      Animation         = AIHERO_SKL.AIHERO_ADTG22
      AnimationMode     = LOOP
      TransitionKey     = TRANS_Flailing
    End

    ConditionState      = DYING EXPLODED_BOUNCING
      Animation         = AIHERO_SKL.AIHERO_ADTG23
      AnimationMode     = ONCE
      TransitionKey     = None
    End

    ; misc anims
    ConditionState      = FREEFALL
      Animation         = AIHERO_SKL.AIHERO_PFL
      AnimationMode     = LOOP
      TransitionKey     = TRANS_Falling
    End
    AliasConditionState = FREEFALL REALLYDAMAGED
    AliasConditionState = FREEFALL DYING

    ConditionState      = PARACHUTING
      Animation         = AIHERO_SKL.AIHERO_PHG
      AnimationMode     = LOOP
      TransitionKey     = TRANS_Chute
    End
    AliasConditionState = PARACHUTING REALLYDAMAGED
    AliasConditionState = PARACHUTING DYING

    TransitionState     = TRANS_Falling TRANS_Chute
      Animation         = AIHERO_SKL.AIHERO_POP
      AnimationMode     = ONCE
      Flags             = PRISTINE_BONE_POS_IN_FINAL_FRAME  ; our bone positions should come from the last frame, rather than the first
    End

    TransitionState     = TRANS_Chute TRANS_Stand
      Animation         = AIHERO_SKL.AIHERO_PTD
      AnimationMode     = ONCE
    End

    TransitionState     = TRANS_Chute TRANS_StandInjured
      Animation         = AIHERO_SKL.AIHERO_PTD
      AnimationMode     = ONCE
    End

    ; note: there are no surrender states because Col. Burton does not surrender.
    ; Death before dishonor!

  End


  ; ***DESIGN parameters ***
  DisplayName      = OBJECT:SAS
  Side = UK
  EditorSorting = INFANTRY
  TransportSlotCount = 1                 ;how many "slots" we take in a transport (0 == not transportable)
  WeaponSet
    Conditions = None
    Weapon = PRIMARY SASStandard
  End
  ArmorSet
    Conditions      = None
    Armor           = HumanArmor
    DamageFX        = InfantryDamageFX
  End
  VisionRange = 200
  ShroudClearingRange = 400
  Prerequisites
    Object = UKBarracks
    Science = SCIENCE_UKSAS
  End
  BuildCost = 2000
  BuildTime = 25.0          ;in seconds

  ExperienceValue = 40 40 60 80    ;Experience point value at each level
  ExperienceRequired = 0 50 100 200  ;Experience points needed to gain each level
  IsTrainable = Yes             ;Can gain experience
  CrushableLevel      = 0  ;What am I?:        0 = for infantry, 1 = for trees, 2 = general vehicles
  CommandSet      = UKInfantrySASCommandSet

  ; *** AUDIO Parameters ***
  VoiceSelect = UKVoiceSelect
  VoiceMove = UKVoiceMove
  VoiceGuard = UKVoiceMove
  VoiceAttack = UKVoiceAttack
  SoundDie = UKVoiceAttack
  SoundDieFire = UKVoiceAttack
  SoundDieToxin = UKVoiceAttack
  VoiceFear = UKVoiceSelect
  SoundStealthOn = StealthOn
  SoundStealthOff = StealthOff
  VoiceFear = UKVoiceAttack

  UnitSpecificSounds
    VoiceCreate          = UKVoiceSelect
    VoiceGarrison = UKVoiceSelect
    VoiceEnter = UKVoiceMove
    VoiceEnterHostile =  UKVoiceMove
    VoiceGetHealed      = UKVoiceMove
  End

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

  Body = ActiveBody ModuleTag_02
    MaxHealth       = 200.0
    InitialHealth   = 200.0
  End

  Behavior = AIUpdateInterface ModuleTag_03
    AutoAcquireEnemiesWhenIdle = Yes
    MoodAttackCheckRate        = 250
  End

  Behavior = AutoFindHealingUpdate   ModuleTag_04 ; This update will have the unit go to a healing station if injured. jba
    ScanRate = 1000 ; once a second.
    ScanRange = 300 ;
    NeverHeal = 0.85 ;  don't heal if we are > 85% healthy.
    AlwaysHeal = 0.25 ; if we get below 25%, find healing right away.
  End

  Locomotor = SET_NORMAL ColonelBurtonGroundLocomotor

  Behavior = ObjectCreationUpgrade ModuleTag_07
    UpgradeObject = OCL_UKSASDemo
    TriggeredBy   = Upgrade_UKSASDemo
    ConflictsWith = Upgrade_ChinaOverlordPropagandaTower Upgrade_ChinaOverlordBattleBunker
  End

  Behavior = CommandSetUpgrade ModuleTag_11
    CommandSet = UKInfantrySASDemoCommandSet
    TriggeredBy   = Upgrade_UKSASDemo
    ConflictsWith = Upgrade_ChinaOverlordGattlingCannon
  End

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

  Behavior = PhysicsBehavior ModuleTag_06
    Mass = 5.0
  End
  Behavior = SquishCollide ModuleTag_10
    ;nothing
  End


; --- begin Death modules ---
  Behavior = SlowDeathBehavior ModuleTag_Death01
    DeathTypes          = ALL -CRUSHED -SPLATTED -EXPLODED -BURNED -POISONED -POISONED_BETA
    SinkDelay           = 3000
    SinkRate            = 0.5     ; in Dist/Sec
    DestructionDelay    = 8000
    FX                  = INITIAL FX_GIDie
  End
  Behavior = SlowDeathBehavior ModuleTag_Death02
    DeathTypes          = NONE +CRUSHED +SPLATTED
    SinkDelay           = 3000
    SinkRate            = 0.5     ; in Dist/Sec
    DestructionDelay    = 8000
    FX                  = INITIAL FX_GIDieCrushed
  End
  Behavior = SlowDeathBehavior ModuleTag_Death03
    DeathTypes          = NONE +EXPLODED
    SinkDelay           = 3000
    SinkRate            = 0.5     ; in Dist/Sec
    DestructionDelay    = 8000
    FX                  = INITIAL FX_GIDie
    FlingForce          = 8
    FlingForceVariance  = 3
    FlingPitch          = 60
    FlingPitchVariance  = 10
  End
  Behavior = SlowDeathBehavior ModuleTag_Death04
    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_GIDie
    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_GIDie
    OCL                 = INITIAL OCL_ToxicInfantryBeta ;you'll have to create this OCL and make it use the blue guys instead of green ones
  End
; --- end Death modules ---

  Behavior = PoisonedBehavior ModuleTag_13
    PoisonDamageInterval = 100  ; Every this many msec I will retake the poison damage dealt me...
    PoisonDuration = 3000       ; ... for this long after last hit by poison damage
  End

  Geometry = CYLINDER
  GeometryMajorRadius = 10.0
  GeometryMinorRadius = 10.0
  GeometryHeight = 12.0
  GeometryIsSmall = Yes
  Shadow = SHADOW_DECAL
  ShadowSizeX = 14;
  ShadowSizeY = 14;
  ShadowTexture = ShadowI;
  BuildCompletion = APPEARS_AT_RALLY_POINT

End

;-------------------------------------------------------------
; UK SAS Demolition Upgrade (Rocket launcher/Explosives)
;-------------------------------------------------------------
;------------------------------------------------------------------------------
Object UKSASDemo

  ; *** ART Parameters ***
  SelectPortrait         = UKSASDemo
  ButtonImage            = UKSASDemo

  ;UpgradeCameo1 = Upgrade_Nationalism
  ;UpgradeCameo1 = Upgrade_ChinaUraniumShells
  ;UpgradeCameo2 = Upgrade_ChinaNuclearTanks
  ;UpgradeCameo4 = NONE
  ;UpgradeCameo5 = Upgrade_ChinaOverlordGattlingCannon


   Draw = W3DModelDraw ModuleTag_01

    OkToChangeModelColor = Yes

   DefaultConditionState
      Model             = NITHNT_SKN
      IdleAnimation     = NITHNT_SKL.NITHNT_STA 0 30
      IdleAnimation     = NITHNT_SKL.NITHNT_IDA
      IdleAnimation     = NITHNT_SKL.NITHNT_IDB
      AnimationMode     = ONCE
      AnimationSpeedFactorRange = 0.8 1.2
      TransitionKey     = TRANS_Stand
      WeaponMuzzleFlash = PRIMARY MuzzleFX
      WeaponFireFXBone  = PRIMARY Muzzle
      WeaponLaunchBone  = PRIMARY Muzzle
      WeaponLaunchBone  = SECONDARY Muzzle

    End
    AliasConditionState = REALLYDAMAGED

    ConditionState      = FIRING_A
      Animation         = NITHNT_SKL.NITHNT_ATA
      AnimationMode     = ONCE
      TransitionKey     = TRANS_START_FIRING
    End
    AliasConditionState = FIRING_A REALLYDAMAGED

    ConditionState      = BETWEEN_FIRING_SHOTS_A
      Animation         = NITHNT_SKL.NITHNT_STA
      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_START_FIRING
    End
    AliasConditionState = BETWEEN_FIRING_SHOTS_A REALLYDAMAGED

    ConditionState      = MOVING
      Animation         = NITHNT_SKL.NITHNT_RNA 20
      AnimationMode     = LOOP
      Flags             = RANDOMSTART
      TransitionKey     = None
      ParticleSysBone   = None InfantryDustTrails
    End
    AliasConditionState = MOVING REALLYDAMAGED

    ConditionState      = RELOADING_A
      Animation         = NITHNT_SKL.NITHNT_ATA 10
      AnimationMode     = ONCE
      ;WeaponLaunchBone = PRIMARY WeaponA
    End
    AliasConditionState = MOVING RELOADING_A
    AliasConditionState = MOVING RELOADING_A REALLYDAMAGED

    ConditionState      = DYING
      Animation         = NITHNT_SKL.NITHNT_DTA
      Animation         = NITHNT_SKL.NITHNT_DTB
      AnimationSpeedFactorRange = 0.9 1.25
      AnimationMode     = ONCE
      TransitionKey     = TRANS_Dying
    End

    TransitionState     = TRANS_Dying TRANS_Flailing
      Animation         = NITHNT_SKL.NITHNT_ADTA1
      AnimationMode     = ONCE
    End

    ConditionState      = DYING EXPLODED_FLAILING
      Animation         = NITHNT_SKL.NITHNT_ADTA2
      AnimationMode     = LOOP
      TransitionKey     = TRANS_Flailing
    End

    ConditionState      = DYING EXPLODED_BOUNCING
      Animation         = NITHNT_SKL.NITHNT_ADTA3
      AnimationMode     = ONCE
      TransitionKey     = None
    End

    ;PARACHUTING ANIMATIONS
    ConditionState      = FREEFALL
      Animation         = NITHNT_SKL.NITHNT_PFL
      AnimationMode     = LOOP
      TransitionKey     = TRANS_Falling
    End
    AliasConditionState = FREEFALL REALLYDAMAGED
    AliasConditionState = FREEFALL DYING

    ConditionState      = PARACHUTING
      Animation         = NITHNT_SKL.NITHNT_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         = NITHNT_SKL.NITHNT_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         = NITHNT_SKL.NITHNT_PTD
      AnimationMode     = ONCE
    End

    ;SURRENDER ANIMATIONS
; surrender is cut. sorry. (srj)
;    ConditionState      = SURRENDER
;      Animation         = NITHNT_SKL.NITHNT_SST
;      AnimationMode     = ONCE
;      TransitionKey     = TRANS_SurrenderKneeling
;    End
;    AliasConditionState = SURRENDER REALLYDAMAGED
;    ;ConditionState     = SURRENDER MOVING
;    ;  Animation        = NITHNT_SKL.NITHNT_SWKB
;    ;  AnimationMode    = ONCE
;    ;  TransitionKey    = TRANS_SurrenderMoving
;    ;End
;    TransitionState     = TRANS_Stand TRANS_SurrenderKneeling
;      Animation         = NITHNT_SKL.NITHNT_SUR
;      AnimationMode     = ONCE
;    End

  End

  ; ***DESIGN parameters ***
  DisplayName      = OBJECT:SAS
  Side = UK
  EditorSorting = SYSTEM
  TransportSlotCount = 1                 ;how many "slots" we take in a transport (0 == not transportable)
  WeaponSet
    Conditions = None
    Weapon = PRIMARY SASRocket
  End
  ArmorSet
    Conditions      = None
    Armor           = HumanArmor
    DamageFX        = InfantryDamageFX
  End
  VisionRange = 200
  ShroudClearingRange = 400
  End
  ExperienceValue = 40 40 60 80    ;Experience point value at each level
  ExperienceRequired = 0 50 100 200  ;Experience points needed to gain each level
  IsTrainable = Yes             ;Can gain experience
  CrushableLevel      = 0  ;What am I?:        0 = for infantry, 1 = for trees, 2 = general vehicles
  CommandSet      = UKInfantrySASDemoCommandSet

  ; *** ENGINEERING Parameters ***
  RadarPriority = UNIT
  KindOf = PRELOAD PORTABLE_STRUCTURE CAN_ATTACK CLICK_THROUGH IGNORED_IN_GUI

  Body = ActiveBody ModuleTag_02
    MaxHealth       = 200.0
    InitialHealth   = 200.0
  End

  Behavior = AIUpdateInterface ModuleTag_03
    AutoAcquireEnemiesWhenIdle = Yes
    MoodAttackCheckRate        = 250
  End

  Behavior = ProductionUpdate ModuleTag_10
    MaxQueueEntries = 1; So you can't build multiple upgrades in the same frame
  End
  Behavior = AutoFindHealingUpdate   ModuleTag_04 ; This update will have the unit go to a healing station if injured. jba
    ScanRate = 1000 ; once a second.
    ScanRange = 300 ;
    NeverHeal = 0.85 ;  don't heal if we are > 85% healthy.
    AlwaysHeal = 0.25 ; if we get below 25%, find healing right away.
  End

  Locomotor = SET_NORMAL ColonelBurtonGroundLocomotor

  Behavior = PhysicsBehavior ModuleTag_06
    Mass = 5.0
  End
  Behavior = SquishCollide ModuleTag_10
    ;nothing
  End

  Behavior = SpecialAbility ModuleTag_08
    SpecialPowerTemplate = SpecialAbilityColonelBurtonRemoteCharges
    UpdateModuleStartsAttack = Yes
    InitiateSound             = ColonelBurtonVoicePlantRemoteCharge
  End
  Behavior = SpecialAbilityUpdate ModuleTag_09
    SpecialPowerTemplate = SpecialAbilityColonelBurtonRemoteCharges
    StartAbilityRange = 0.0
    PreparationTime = 0
    SpecialObject = RemoteC4Charge
    MaxSpecialObjects = 8
    SpecialObjectsPersistWhenOwnerDies = No ;Charges are removed instantly when owner dies (nobody can detonate).
    AlwaysValidateSpecialObjects = Yes      ;Coupled with the above setting, this one is necessary for code optimization.
    SpecialObjectsPersistent = Yes          ;Charges are persistent till lifetime expires or owner detonates them.
    UniqueSpecialObjectTargets = Yes        ;This prevents multiple charges placed on the same object.
    UnpackTime              = 5500          ;NOTE: Modifying this value will require modifying the delay for ColonelBurtonPlantCharge
    PackTime                = 0
    SkipPackingWithNoTarget = Yes           ;When yes, the packing/unpacking will be ignored when detonating charges.
    FlipOwnerAfterUnpacking = Yes
    FleeRangeAfterCompletion = 100.0         ;Runs away after finishing ability
    UnpackSound               = ColonelBurtonPlantCharge
    LoseStealthOnTrigger      = Yes
    PreTriggerUnstealthTime   = 5000 ; in milliseconds
  End

  Behavior = SpecialAbility ModuleTag_10
    SpecialPowerTemplate = SpecialAbilityColonelBurtonTimedCharges
    UpdateModuleStartsAttack = Yes
    InitiateSound             = ColonelBurtonVoicePlantTimedCharge
  End
  Behavior = SpecialAbilityUpdate ModuleTag_11
    SpecialPowerTemplate = SpecialAbilityColonelBurtonTimedCharges
    StartAbilityRange = 0.0
    PreparationTime = 0
    SpecialObject = TimedC4Charge
    MaxSpecialObjects = 10
    SpecialObjectsPersistWhenOwnerDies = Yes
    SpecialObjectsPersistent = Yes          ;Charges are persistent till lifetime expires or owner detonates them.
    UniqueSpecialObjectTargets = Yes        ;This prevents multiple charges placed on the same object.
    UnpackTime              = 5500          ;NOTE: Modifying this value will require modifying the delay for ColonelBurtonPlantCharge
    FlipOwnerAfterUnpacking = Yes
    FleeRangeAfterCompletion = 100.0         ;Runs away after finishing ability
    UnpackSound               = ColonelBurtonPlantCharge
    LoseStealthOnTrigger      = Yes
    PreTriggerUnstealthTime   = 5000 ; in milliseconds

  End

; --- begin Death modules ---
  Behavior = SlowDeathBehavior ModuleTag_Death01
    DeathTypes          = ALL -CRUSHED -SPLATTED -EXPLODED -BURNED -POISONED -POISONED_BETA
    SinkDelay           = 3000
    SinkRate            = 0.5     ; in Dist/Sec
    DestructionDelay    = 8000
    FX                  = INITIAL FX_GIDie
  End
  Behavior = SlowDeathBehavior ModuleTag_Death02
    DeathTypes          = NONE +CRUSHED +SPLATTED
    SinkDelay           = 3000
    SinkRate            = 0.5     ; in Dist/Sec
    DestructionDelay    = 8000
    FX                  = INITIAL FX_GIDieCrushed
  End
  Behavior = SlowDeathBehavior ModuleTag_Death03
    DeathTypes          = NONE +EXPLODED
    SinkDelay           = 3000
    SinkRate            = 0.5     ; in Dist/Sec
    DestructionDelay    = 8000
    FX                  = INITIAL FX_GIDie
    FlingForce          = 8
    FlingForceVariance  = 3
    FlingPitch          = 60
    FlingPitchVariance  = 10
  End
  Behavior = SlowDeathBehavior ModuleTag_Death04
    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_GIDie
    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_GIDie
    OCL                 = INITIAL OCL_ToxicInfantryBeta ;you'll have to create this OCL and make it use the blue guys instead of green ones
  End
; --- end Death modules ---

  Behavior = PoisonedBehavior ModuleTag_13
    PoisonDamageInterval = 100  ; Every this many msec I will retake the poison damage dealt me...
    PoisonDuration = 3000       ; ... for this long after last hit by poison damage
  End

  Geometry = CYLINDER
  GeometryMajorRadius = 10.0
  GeometryMinorRadius = 10.0
  GeometryHeight = 12.0
  GeometryIsSmall = Yes
  Shadow = SHADOW_DECAL
  ShadowSizeX = 14;
  ShadowSizeY = 14;
  ShadowTexture = ShadowI;
End
Upgrade.ini
Code:
Upgrade Upgrade_UKSASDemo
  DisplayName        = UPGRADE:SASDemo
  Type               = OBJECT
  BuildTime          = 20.0
  BuildCost          = 1800
  ButtonImage        = UKSASDemo
  ResearchSound      = UKVoiceSelect
  UnitSpecificSound  = UKVoiceSelect
End
Objectcreationlist.ini
Code:
; -----------------------------------------------------------------------------
ObjectCreationList OCL_UKSASDemo
  CreateObject
    ObjectNames       = UKSASDemo
    Count             = 1
    ContainInsideSourceObject = Yes
  End
End
CommandButton.ini
Code:
CommandButton Command_UpgradeUKSASDemo
  Command       = OBJECT_UPGRADE
  Upgrade       = Upgrade_UKSASDemo
  Options       = OK_FOR_MULTI_SELECT NOT_QUEUEABLE
  TextLabel     = CONTROLBAR:UpgradeUKSASDemo
  ButtonImage   = UKSASDemo
  ButtonBorderType        = UPGRADE ; Identifier for the User as to what kind of button this is
  DescriptLabel           = UPGRADE:SASDemo
  UnitSpecificSound       = UKVoiceSelect
End
Commandset.ini
Code:
CommandSet UKInfantrySASCommandSet
  1  = Command_UpgradeUKSASDemo
  9  = Command_AttackMove
  11 = Command_Guard
  12 = Command_Stop
End

CommandSet UKInfantrySASDemoCommandSet
  2  = Command_ColonelBurtonTimedDemoCharge
  4  = Command_ColonelBurtonRemoteDemoCharge
  6  = Command_ColonelBurtonDetonateCharges
  9  = Command_AttackMove
  11 = Command_Guard
  12 = Command_Stop
End
Any suggestions? even if you look at it and can't see any problems let me know becus maybe its something in one of my other units code.
Malc is offline   Reply With Quote