logo   login
right
Home Forums Downloads Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Forum Info
Forum Members: 18,642
Total Threads: 8,744
Posts: 95,508

Administrators:
DeeZire, Redemption

There are currently 28 users online.
Partner Links

Free Credit Repair

Learn the Ticket Broker Secrets
Advertisements


Generals & Zero Hour Editing Discuss any modding related issues to do with Generals and Zero Hour here.

Reply
 
LinkBack Thread Tools
Old 09-30-2006, 01:01 PM   #1 (permalink)
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  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 09-30-2006, 02:39 PM   #2 (permalink)
Senior Member
 
Join Date: Aug 2004
Location: Philippines
Posts: 435
Send a message via MSN to IraqiPeopleRocks Send a message via Yahoo to IraqiPeopleRocks
Default

Why not do the Generals way?

instead of a single " SpawnTemplateName = ToxinTruckSlave" line why not try coding it much like the angry mob?

Quote:
Behavior = SpawnBehavior ModuleTag_05
SpawnNumber = 10
SpawnReplaceDelay = 30000 ; 30 seconds
SpawnTemplateName = GLAInfantryAngryMobPistol01 ; Aladdin
SpawnTemplateName = GLAInfantryAngryMobRock02 ; Woman in the Gypsy Costume
SpawnTemplateName = GLAInfantryAngryMobMolotov02 ; The Lady with the hot sauce
SpawnTemplateName = GLAInfantryAngryMobPistol03 ; Skinny Guy with the Green Beret
SpawnTemplateName = GLAInfantryAngryMobRock04 ; Fat guy with the tank top
SpawnTemplateName = GLAInfantryAngryMobMolotov02 ; The Lady with the hot sauce
SpawnTemplateName = GLAInfantryAngryMobPistol05 ; The robed dude with the Man-Veil
ExitByBudding = Yes
InitialBurst = 5 ; the first set of 5 will not delay
OneShot = No
AggregateHealth = Yes
SlavesHaveFreeWill = No
End
IraqiPeopleRocks is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 09-30-2006, 02:51 PM   #3 (permalink)
Senior Member
 
Join Date: Apr 2003
Location: Derby, UK / Den Haag, NL
Posts: 590
Default

That doesn't make a difference - it just reads through the list of template names and spawns them in the order given, and then does it again. I can list the entry four times, but it still has the same effect.

Thanks anyway.

I've also managed to replicate the bug with Rocket Buggies, but no other units. It's a curiosity, to say the least. I'll just have to keep plowing through
Ambershee is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 01-08-2008, 12:07 AM   #4 (permalink)
Senior Member
 
Join Date: Jan 2008
Posts: 703
Default

Doesn't you slave object need the MobMemberSlavedUpdate module? See the angry mob members for example.
beng is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Nexus Logic AntiSocialKindaGuy Generals & Zero Hour Editing 6 03-11-2006 09:30 AM
Spawning Death3464 Red Alert 2 & Yuri's Revenge Editing 33 05-16-2005 01:20 PM
Flying mob nexus? Fritz Generals & Zero Hour Editing 3 08-24-2004 05:12 PM
Mob nexus won't be transported Fritz Generals & Zero Hour Editing 3 07-12-2004 07:59 AM
Spawning units and more a_katbi17 Red Alert 2 & Yuri's Revenge Editing 20 05-07-2003 05:54 PM


All times are GMT -4. The time now is 03:46 PM.


Design By: Miner Skinz.com
Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.