unnem
  • unnem
  • 50.25% (Neutral)
  • Private Topic Starter
12 years ago
I have weird problem with one of my units.
This unit is firing aoe weapon whole time (just like microwave tank does damage to infantry around)
everything works good BUT when that thing gets destroyed weapon is still working and i have no idea why.
Code:

Object ZombieSpecialStructure
  ; ***DESIGN parameters ***

  Draw = W3DModelDraw ModuleTag_01
  OkToChangeModelColor = Yes
  
    ConditionState     = NONE
      Model            = XXX_STRUCTURE
      Animation        = XXX_STRUCTURE.XXX_STRUCTURE
      AnimationMode    = LOOP
      ParticleSysBone  = FXBONE01 XXXSTRCloudSmall
    End

    ConditionState     = POST_COLLAPSE
      Model            = NONE
    End
  End

  DisplayName     = OBJECT:XXX
  Side            = Zombie
  EditorSorting   = STRUCTURE
  TransportSlotCount = 0

  ArmorSet
    Conditions      = None
    Armor                 = XXXArmorSmall
    DamageFX              = XXXDamageFXSmall
  End
  
  BuildCost       = 8000
  BuildTime       = 60.0          ;in seconds    
  VisionRange     = 300
  ShroudClearingRange = 300
  
  ExperienceValue = 500 500 1000 1500    ;Experience point value at each level
  ExperienceRequired = 0 100 150 300  ;Experience points needed to gain each level
  IsTrainable = No             ;Can gain experience
  CrusherLevel           = 3  ;What can I crush?: 1 = infantry, 2 = trees, 3 = vehicles
  CrushableLevel         = 3  ;What am I?:        0 = for infantry, 1 = for trees, 2 = general vehicles
  
  RadarPriority = UNIT
  KindOf = PRELOAD SELECTABLE CAN_CAST_REFLECTIONS SCORE
  
  SoundAmbient = XXXAmbientSound
  
  ; *** ENGINEERING Parameters ***
  Body      = StructureBody ModuleTag_03
    MaxHealth         = 3500.0
    InitialHealth     = 3500.0
  End 
  
  Behavior = PhysicsBehavior ModuleTag_04
    Mass = 50.0
  End
  
  Behavior = AIUpdateInterface ModuleTag_04andhalf
    ForbidPlayerCommands = Yes ; this AIUpdate will only do command if from script or AI, not player
  End
  
  Locomotor = SET_NORMAL ZombieSpecialStructureLocomotor
  
  Behavior = DestroyDie ModuleTag_05
    DeathTypes = NONE
  End
  
  CommandSet = XXXMotherCommandSet

  Behavior = ProductionUpdate ModuleTag_06
    QuantityModifier = DamagedZombiekr 5
    QuantityModifier = HammerZombiekr 5
    QuantityModifier = FastZombiekr 5
    QuantityModifier = BurningZombielrskr 2
    QuantityModifier = BurningZombierskr 3
  End
  
  Behavior = DefaultProductionExitUpdate ModuleTag_07
    UnitCreatePoint    = X:  0.0  Y:  0.0   Z:-25.0
    NaturalRallyPoint  = X:  111.0  Y:  111.0   Z:0.0
  End
  
  Behavior                  = StructureCollapseUpdate ModuleTag_08
    MinCollapseDelay        = 500
    MaxCollapseDelay        = 1000
    CollapseDamping         = 0.0
    MaxShudder              = 0.6
    MinBurstDelay           = 250
    MaxBurstDelay           = 800
    BigBurstFrequency       = 4
    OCL                     = INITIAL   OCL_StructureCollapseInitial
    OCL                     = DELAY     OCL_StructureCollapseDelay
    OCL                     = FINAL     OCL_StructureCollapseFinal
    FXList                  = INITIAL   FX_StructureCollapseInitial
    FXList                  = DELAY     FX_StructureCollapseDelay
    FXList                  = BURST     FX_StructureCollapseBurst
    FXList                  = FINAL     FX_StructureCollapseFinal
  End
  
  Behavior = SlowDeathBehavior ModuleTag_Death01
    DeathTypes = ALL
    ProbabilityModifier  = 50
    DestructionDelay  = 1000
    DestructionDelayVariance  = 100
    FX     = FINAL    FX_MOABIgnite
    Weapon = FINAL    XXXAirGasBig
  End
 
  Behavior = FireWeaponUpdate ModuleTag_09
    Weapon = XXXAirGas
    ExclusiveWeaponDelay = 100 ; If we fire a real weapon, we turn this module off for this long
  End

  Behavior = FlammableUpdate ModuleTag_10
    AflameDuration = 5000         ; If I catch fire, I'll burn for this long...
    AflameDamageAmount = 3       ; taking this much damage...
    AflameDamageDelay = 500       ; this often.
  End
  
  Geometry = Box
  GeometryIsSmall = No
  GeometryMajorRadius = 80.0
  GeometryMinorRadius = 80.0
  GeometryHeight = 30.0
  Shadow = SHADOW_DECAL
  ShadowTexture = XXX_Decal
  ShadowSizeX = 550
  ShadowSizeY = 550
  BuildCompletion = PLACED_BY_PLAYER
End
Sponsor
Annihilationzh
12 years ago
Oh the irony; when your Zombie structure reaches 0 HP, it becomes undead.

You've done some very strange things with it's death-related modules.

This is completely useless code, it does nothing:
Behavior = DestroyDie ModuleTag_05
DeathTypes = NONE
End

and what is the point of this?
ConditionState = POST_COLLAPSE
Model = NONE
End

You need to have a Die module for ALL of it's death types.
If you need help, post in the forum. You'll get help a lot faster than if you send me a PM.

I reject all buddy requests. I don't think 'buddy' needs to be made official. It's not like you're marrying me.
unnem
  • unnem
  • 50.25% (Neutral)
  • Private Topic Starter
12 years ago
i have slow death behavior with all death types...?

and that POST_COLLAPSE is there because i had some problems with model when it was collapsing (after collapse animation it was like teleporting to normal height and after few seconds bam - disappeared)
Annihilationzh
12 years ago

i have slow death behavior with all death types...?


Yeah, well, I'm not very observant >_>

I honestly have no experience in solving many of the issues you're having because I simply don't get any problems when I code.
If you need help, post in the forum. You'll get help a lot faster than if you send me a PM.

I reject all buddy requests. I don't think 'buddy' needs to be made official. It's not like you're marrying me.
qqqqqqqqqp
12 years ago
Weapon in the death module 😮 never seen a code like that ( i gess i need to look at the nuke and scud)
9Q_1P at your service. Moddin help and mod maker ranges from paradrop planes, aircraftcarriers and yes snow men with death lazer eyes
Want a peek? Visit this page
Advanced warfare