Ail-Shan
  • Ail-Shan
  • 50.25% (Neutral)
  • Private Topic Starter
13 years ago
This is getting really annoying. So I'm trying to keep myself from duplicated units because I want the equivalent of about 5 weaponset upgrades based on the choices the player makes. To do so I need to move all of the fire (fire fields, firestorms etc) into FireWeaponWhenDeadBehaviors in the relevant WeaponObjects. However for some reason, none of the behaviors are actually going off. Here's an example:


Object ImmolatorTankShell

  ; *** ART Parameters ***
  Draw = W3DModelDraw ModuleTag_01
    ConditionState = NONE
      Model = EXShellTrail
    End
    ConditionState = USER_1
      Model           = EXShellTrail
      ParticleSysBone = None MissileExhaust2
    End
  End
  Scale = 0.75

  ; ***DESIGN parameters ***
  DisplayName       = OBJECT:TankShell
  EditorSorting     = SYSTEM
  ArmorSet
    Armor = ProjectileArmor
  End
  VisionRange = 0.0  

  ; *** ENGINEERING Parameters ***
  KindOf = PROJECTILE
  Body = ActiveBody ModuleTag_02
    MaxHealth       = 100.0
    InitialHealth   = 100.0
  End

  Behavior = DestroyDie ModuleTag_03
  End
    
  Behavior = DumbProjectileBehavior ModuleTag_04
    FirstHeight = 0
    SecondHeight = 0
    FirstPercentIndent = 33%
    SecondPercentIndent = 66%
    FlightPathAdjustDistPerSecond = 9999
  End

  Behavior = PhysicsBehavior ModuleTag_05
    Mass = 0.01   ; we can't have a zero mass, but we want it pretty tiny...
  End

; ---- begin Projectile death behaviors


;---------------------------------------------------------
;--These spawn the correct firestorm/thermoberic explision
;--based on the necessary upgrades (fire conflicts with---
;--unconventional upgrade, thermoberic conflicts with-----
;--conventional upgrade-----------------------------------


  Behavior = FireWeaponWhenDeadBehavior DeathModuleTag_CreateFireBlack
    DeathWeapon = TinyFireFieldCreationWeapon_Black
    StartsActive = Yes
    ConflictsWith = Upgrade_ImprovedChemicals Upgrade_TechSpecialization_2
  End

  Behavior = FireWeaponWhenDeadBehavior DeathModuleTag_CreateFireNova
    DeathWeapon = TinyFireFieldCreationWeapon_Nova
    StartsActive = No
    TriggeredBy = Upgrade_ImprovedChemicals
    ConflictsWith = Upgrade_TechSpecialization_2
  End

  Behavior = FireWeaponWhenDeadBehavior DeathModuleTag_CreateTBExplosion
    DeathWeapon = TinyTBMDetonationCreationWeapon
    StartsActive = No
    TriggeredBy  = Upgrade_TechSpecialization_2
    ConflictsWith = Upgrade_HighExplosiveBombs Upgrade_TechSpecialization_1
  End

  Behavior = FireWeaponWhenDeadBehavior DeathModuleTag_CreateTBExplosionEfficient
    DeathWeapon = TinyTBMDetonationCreationWeapon_Efficient
    StartsActive = No
    TriggeredBy = Upgrade_HighExplosiveBombs Upgrade_TechSpecialization_2
    RequiresAllTriggers = Yes
    ConflictsWith = Upgrade_TechSpecialization_1
  End

; ---- end Projectile death behaviors


  Geometry = Sphere
  GeometryIsSmall = Yes
  GeometryMajorRadius = 1.0
End

The above should set off one of the following weapons:


;------------------------------------------------------------------------------
Weapon TinyFireFieldCreationWeapon_Black
  FireOCL = OCL_FireFieldTiny_Black
  PrimaryDamage = 0.0
  PrimaryDamageRadius = 1.0
  HistoricBonusTime  = 3000
  HistoricBonusCount = 12
  HistoricBonusRadius= 60
  HistoricBonusWeapon= FirestormSmallCreationWeapon
End

;------------------------------------------------------------------------------
Weapon TinyFireFieldCreationWeapon_Nova
  FireOCL = OCL_FireFieldTiny_Nova
  PrimaryDamage = 0.0
  PrimaryDamageRadius = 1.0
  HistoricBonusTime  = 3000
  HistoricBonusCount = 8
  HistoricBonusRadius= 60
  HistoricBonusWeapon= FirestormSmallCreationWeapon
End

;------------------------------------------------------------------------------
Weapon TinyTBMDetonationCreationWeapon
  FireOCL = OCL_TinyTBMExplode
  PrimaryDamage = 0.0
  PrimaryDamageRadius = 1.0
End

;------------------------------------------------------------------------------
Weapon TinyTBMDetonationCreationWeapon_Efficient
  FireOCL = OCL_TinyTBMExplode
  PrimaryDamage = 0.0
  PrimaryDamageRadius = 1.0
End

Which create one of the following OCLs


; ----------------------------------------------
ObjectCreationList OCL_FireFieldTiny_Black
 CreateObject
   ObjectNames = FireFieldTiny_Black
   Disposition = ON_GROUND_ALIGNED
 End
End

; ----------------------------------------------
ObjectCreationList OCL_FireFieldTiny_Nova
 CreateObject
   ObjectNames = FireFieldTiny_Nova
   Disposition = ON_GROUND_ALIGNED
 End
End

;-------------------------------------------------------------------------
ObjectCreationList OCL_TinyTBMExplode
  CreateObject
    ObjectNames = TinyTBMGas
    Disposition = LIKE_EXISTING
  End
End

ObjectCreationList OCL_TinyTBMExplode_Efficient
  CreateObject
    ObjectNames = TinyTBMGas_Efficient
    Disposition = LIKE_EXISTING
  End
End

Which create an object (System.ini in the case of fire, special WeaponObjects which have an actual explosion weapon, which I could probably cut out that middle man and just fire the thermoberic explosion weapon in the first place).

NONE of the above actually works, and I don't know why. Any ideas?
Sponsor
Annihilationzh
13 years ago
The projectile isn't dying properly.

You may need a DetonateCallsKill in DumbProjectileBehavior.

And if that doesn't work, you might need to add a HeightDieUpdate like the inferno cannon shell.
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.
Ail-Shan
  • Ail-Shan
  • 50.25% (Neutral)
  • Private Topic Starter
13 years ago
DetonateCallsKill is what I was missing (and MissileCallsOnDie for missile based weapons I believe). Thanks