Posted by: Ail-Shan - Wednesday, December 5, 2012 2:13:31 PM
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:
[code]
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
[/code]
The above should set off one of the following weapons:
[code]
;------------------------------------------------------------------------------
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
[/code]
Which create one of the following OCLs
[code]
; ----------------------------------------------
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
[/code]
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?
Posted by: Annihilationzh - Thursday, December 6, 2012 4:53:49 PM
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.
Posted by: Ail-Shan - Friday, December 7, 2012 3:55:46 PM
DetonateCallsKill is what I was missing (and MissileCallsOnDie for missile based weapons I believe). Thanks