View Single Post
Old 09-30-2006, 02:01 PM   #1 (permalink)
Ambershee
Senior Member
 
Join Date: Apr 2003
Location: Derby, UK / Den Haag, NL
Posts: 590
Default Nexus spawning too many units

This is an interesting one. I have a nexus that spawns Toxin Tractors. Should be nice and simple.

However instead of spawning four units, this one insists on spawning five. The first four are all perfectly fine, however the fifth one is also unselectable and has a different locomotor to the first four too. This is really quite strange.

Nexus:
Code:
Object GLAVehicleToxinTruck

;**** ART Parameters **************************
  SelectPortrait         = SUToxinTractor_L
  ButtonImage            = SUToxinTractor
  
  UpgradeCameo1 = Upgrade_GLAAnthraxBeta
  UpgradeCameo2 = Upgrade_GLAJunkRepair
  ;UpgradeCameo3 = NONE
  ;UpgradeCameo4 = NONE
  ;UpgradeCameo5 = NONE
  
  
  
  Draw = W3DModelDraw ModuleTag_01
    OkToChangeModelColor = Yes
    DefaultConditionState
      Model = None
;      Model = AVBomber_B
    End
  End


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

  DisplayName      = OBJECT:AngryMobNexus
  Side = GLA

  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           = InvulnerableAllArmor
    DamageFX        = None
  End

  BuildCost       = 300
  BuildTime       = 15.0          ;in seconds    
  VisionRange     = 150  ; it can scout for the spawn
  ShroudClearingRange = 0

  Prerequisites
    Object = GLAArmsDealer
  End

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

  IsTrainable     = No



  CommandSet    = GLAVehicleToxinTruckCommandSet;

;**** AUDIO Parameters *****************************

  VoiceSelect         = ToxinTractorVoiceSelect
  VoiceMove           = ToxinTractorVoiceMove
  VoiceGuard          = ToxinTractorVoiceMove
  VoiceAttack         = ToxinTractorVoiceAttack
  SoundMoveStart      = ToxinTractorMoveStart
  SoundMoveStartDamaged = ToxinTractorMoveStart
  SoundDie            = ToxinTractorDie

  UnitSpecificSounds
    ; These have the syntax of SomeNameSomewhereInCode = SomeNameSomewhereInLookupINIs
    VoiceCreate         = ToxinTractorVoiceCreate
    TurretMoveStart     = NoSound
    TurretMoveLoop      = TurretMoveLoop
   TruckLandingSound    = NoSound
   TruckPowerslideSound = NoSound
    VoiceCrush      = ToxinTractorVoiceCrush
    VoiceEnter           = ToxinTractorVoiceMove
    VoicePoisonLocation = ToxinTractorVoiceAttackContam

  End


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

  KindOf = PRELOAD CAN_ATTACK INFANTRY MOB_NEXUS ATTACK_NEEDS_LINE_OF_SIGHT NO_COLLIDE SELECTABLE SCORE
  Body = ImmortalBody ModuleTag_02
    MaxHealth       = 99999.0
    InitialHealth   = 99999.0
  End

  Behavior = AIUpdateInterface ModuleTag_03
    AutoAcquireEnemiesWhenIdle = Yes
  End

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


  Behavior = PhysicsBehavior ModuleTag_04
    Mass = 50.0
  End

  Behavior            = SpawnBehavior ModuleTag_05
    SpawnNumber       = 4
    SpawnReplaceDelay = 90000

        SpawnTemplateName = ToxinTruckSlave

    ExitByBudding = Yes;!

    InitialBurst = 4 ; the first set of 5 will not delay
    OneShot     = No
    AggregateHealth = Yes
  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 5 will not delay
  End

  Behavior = DestroyDie ModuleTag_07
    DeathTypes = ALL
  End

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

End

Vehicle
Code:
Object ToxinTruckSlave

  ; *** ART Parameters ***
  SelectPortrait         = SUToxinTractor_L
  ButtonImage            = SUToxinTractor
  
  UpgradeCameo1 = Upgrade_GLAAnthraxBeta
  UpgradeCameo2 = Upgrade_GLAJunkRepair
  ;UpgradeCameo3 = NONE
  ;UpgradeCameo4 = NONE
  ;UpgradeCameo5 = NONE
  
  Draw = W3DTruckDraw ModuleTag_01
    OkToChangeModelColor = Yes
    DefaultConditionState 
      Model = UVToxinTrk
      Turret = Turret
      TurretPitch = TurretEL
      WeaponFireFXBone = PRIMARY WeaponA
      WeaponLaunchBone = PRIMARY WeaponA
      WeaponFireFXBone = SECONDARY Spigot
      WeaponLaunchBone = SECONDARY Spigot
    End
    AliasConditionState WEAPONSET_PLAYER_UPGRADE
    ConditionState = USING_WEAPON_B 
      Model = UVToxinTrk
      ParticleSysBone = none ToxinPuddleContinuous
    END
    ConditionState = USING_WEAPON_B WEAPONSET_PLAYER_UPGRADE
      Model = UVToxinTrk
      ParticleSysBone = none AnthraxPuddleContinuous
    END

    ConditionState = REALLYDAMAGED
      Model = UVToxinTrk_D
    End
    AliasConditionState REALLYDAMAGED WEAPONSET_PLAYER_UPGRADE
    ConditionState = USING_WEAPON_B REALLYDAMAGED
      Model = UVToxinTrk_D
      ParticleSysBone = none ToxinPuddleContinuous
    END
    ConditionState = USING_WEAPON_B REALLYDAMAGED WEAPONSET_PLAYER_UPGRADE 
      Model = UVToxinTrk_D
      ParticleSysBone = none AnthraxPuddleContinuous
    END

    ConditionState = RUBBLE
      Model = UVToxinTrk_D
    End
    AliasConditionState WEAPONSET_PLAYER_UPGRADE RUBBLE

    TrackMarks = EXTireTrack.tga
    LeftFrontTireBone = Tire01
    RightFrontTireBone = Tire02
    LeftRearTireBone = Tire03

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

    Dust = RocketBuggyDust
    DirtSpray = RocketBuggyDirtSpray

  End

  ; ***DESIGN parameters ***
  DisplayName         = OBJECT:ToxinTruck
  Side                = GLA
  EditorSorting       = VEHICLE
  TransportSlotCount  = 3                 ;how many "slots" we take in a transport (0 == not transportable)
  WeaponSet 
    Conditions        = None 
    Weapon            = PRIMARY     ToxinTruckGun
    Weapon            = SECONDARY   ToxinTruckSprayer
    AutoChooseSources = PRIMARY     FROM_PLAYER FROM_SCRIPT FROM_AI
    AutoChooseSources = SECONDARY   NONE ;Special attack only
  End
  WeaponSet
    Conditions        = PLAYER_UPGRADE 
    Weapon            = PRIMARY     ToxinTruckGunUpgraded
    Weapon            = SECONDARY   ToxinTruckSprayerUpgraded
    AutoChooseSources = PRIMARY     FROM_PLAYER FROM_SCRIPT FROM_AI
    AutoChooseSources = SECONDARY   NONE ;Special attack only
  End
  ArmorSet
    Conditions        = None
    Armor             = ToxinTruckArmor
    DamageFX          = TruckDamageFX
  End
  BuildCost           = 600
  BuildTime           = 5.0          ;in seconds    
  VisionRange         = 100
  ShroudClearingRange = 200
  Prerequisites
    Object = GLAArmsDealer
  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           = 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          = GLAVehicleToxinTruckCommandSet

  ; *** AUDIO Parameters ***
  VoiceSelect         = ToxinTractorVoiceSelect
  VoiceMove           = ToxinTractorVoiceMove
  VoiceGuard          = ToxinTractorVoiceMove
  VoiceAttack         = ToxinTractorVoiceAttack
  SoundMoveStart      = ToxinTractorMoveStart
  SoundMoveStartDamaged = ToxinTractorMoveStart
  SoundDie            = ToxinTractorDie

  UnitSpecificSounds
    ; These have the syntax of SomeNameSomewhereInCode = SomeNameSomewhereInLookupINIs
    VoiceCreate         = ToxinTractorVoiceCreate
    TurretMoveStart     = NoSound
    TurretMoveLoop      = TurretMoveLoop
   TruckLandingSound    = NoSound
   TruckPowerslideSound = NoSound
    VoiceCrush      = ToxinTractorVoiceCrush
    VoiceEnter           = ToxinTractorVoiceMove
    VoicePoisonLocation = ToxinTractorVoiceAttackContam

  End

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

  Body = ActiveBody ModuleTag_02
    MaxHealth           = 240.0
    InitialHealth       = 240.0
  End

  Behavior = AIUpdateInterface ModuleTag_03
    AutoAcquireEnemiesWhenIdle = Yes
    Turret
      TurretTurnRate            = 180
      TurretPitchRate           = 180
      AllowsPitch               = Yes
      MinPhysicalPitch          = -20 ; If allows pitch, the lowest I can dip down to shoot.  defaults to 0 (horizontal)
      TurretFireAngleSweep      = PRIMARY 8
      TurretSweepSpeedModifier  = PRIMARY 0.5    ; Sweep slower than you turn
      ControlledWeaponSlots     = PRIMARY
    End
  End
  Locomotor             = SET_NORMAL GLAFastVehicleLocomotor
  Behavior              = PhysicsBehavior ModuleTag_04
    Mass                = 10.0
  End

  Behavior                    = SlowDeathBehavior  ModuleTag_05
    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
    OCL                       = INITIAL OCL_ToxinTractorDeathEffect
    FX                        = FINAL FX_ToxinTruckExplosionOneFinal
  End
  Behavior                    = InstantDeathBehavior  ModuleTag_06
    DeathTypes                = NONE +CRUSHED +SPLATTED
    FX                        = FX_CarCrush
    OCL                       = OCL_CrusaderTank_CrushEffect
  End
    
  Behavior = CreateCrateDie ModuleTag_07
    CrateData   = SalvageCrateData
    ;CrateData  = EliteTankCrateData
    ;CrateData  = HeroicTankCrateData
  End

  Behavior = WeaponSetUpgrade ModuleTag_08
    ; the Toxin Tractor 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_11
    ReallyDamagedParticleSystem1  = Bone:Smoke RandomBone:Yes PSys:SmallLightSmokeColumn
    ReallyDamagedFXList1          = Loc: X:0 Y:0 Z:0 FXList:FX_BattleMasterDamageTransition
  End
  
  Behavior = AutoHealBehavior ModuleTag_12
    HealingAmount   = 2
    HealingDelay    = 1000 ; msec
    TriggeredBy     = Upgrade_GLAJunkRepair
  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 = FireOCLAfterWeaponCooldownUpdate ModuleTag_13
    WeaponSlot            = SECONDARY
    ConflictsWith         = Upgrade_GLAAnthraxBeta Upgrade_Veterancy_HEROIC
    OCL                   = OCL_PoisonFieldMedium
    MinShotsToCreateOCL   = 4
    OCLLifetimePerSecond  = 10000
    OCLLifetimeMaxCap     = 180000
  End
  Behavior = FireOCLAfterWeaponCooldownUpdate ModuleTag_14
    WeaponSlot            = SECONDARY
    TriggeredBy           = Upgrade_GLAAnthraxBeta Upgrade_Veterancy_HEROIC
    OCL                   = OCL_PoisonFieldUpgradedMedium
    MinShotsToCreateOCL   = 4
    OCLLifetimePerSecond  = 10000
    OCLLifetimeMaxCap     = 180000
  End

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

  Geometry = BOX
  GeometryMajorRadius = 13.0
  GeometryMinorRadius = 9.0
  GeometryHeight = 10.0   ; set to make the projectile stream look right  
  GeometryIsSmall = Yes    
  Shadow = SHADOW_VOLUME
  ShadowSizeX = 45  ; minimum elevation angle above horizon. Used to limit shadow length

End

Thanks in advance for any help, although this one is a bit strange. I may end up re-writing the entries as the only solution :tard:
Ambershee is offline   Reply With Quote