View Single Post
Old 07-10-2003, 06:18 AM   #10 (permalink)
Malc
Senior Member
 
Join Date: Feb 2003
Location: UK
Posts: 164
Default

Ok, I think ive narrowed it down to the problem being inside this code.

Code:
;-------------------------------------------------------------
; 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
Malc is offline   Reply With Quote