Hi, I've created a simple cluster weapon, using 2 Weapons and 2 WeaponObjects.
The code is:
Weapon.ini
Weapon WarhammerCannonGun
PrimaryDamage = 300.0
PrimaryDamageRadius = 60.0
ScatterRadius = 60.0 ;When this weapon is used against infantry, it can randomly miss by as much as this distance.
AttackRange = 600
MinimumAttackRange = 200.0
AcceptableAimDelta = 180 ; Don't need to turn at all.
DamageType = EXPLOSION
DeathType = EXPLODED
WeaponSpeed = 450 ; dist/sec
ProjectileObject = WarHammerCannonShellMain
FireFX = WeaponFX_NukeCannonMuzzleFlash
VeterancyFireFX = HEROIC WeaponFX_HeroicNukeCannonMuzzleFlash
FireSound = NukeCannonWeapon
ProjectileDetonationFX = FX_WarhammerExplosion
RadiusDamageAffects = ENEMIES NEUTRALS ALLIES NOT_SIMILAR
PreAttackDelay = 350
PreAttackType = PER_SHOT
DelayBetweenShots = 12000 ; time between shots, msec
ClipSize = 0 ; how many shots in a Clip (0 == infinite)
ClipReloadTime = 0 ; how long to reload a Clip, msec
End
Weapon WarhammerCannonCluster
PrimaryDamage = 30.0
PrimaryDamageRadius = 20.0
AttackRange = 230.0
ScatterRadius = 80
DamageType = JET_MISSILES
DeathType = EXPLODED
WeaponSpeed = 80
ProjectileObject = WarHammerCannonShellCluster
RadiusDamageAffects = ALLIES ENEMIES NEUTRALS NOT_SIMILAR
AutoReloadsClip = Yes
ProjectileDetonationFX = FX_WarhammerExplosionCluster
End
WeaponObjects.ini
Object WarHammerCannonShellMain
; *** ART Parameters ***
Draw = W3DModelDraw ModuleTag_01
OkToChangeModelColor = Yes
DefaultConditionState
Model = NVWrhmmrCn_S
ParticleSysBone = None ArtilleryBarrageTrail
End
ConditionState = JAMMED
ParticleSysBone = None SparksMedium
End
AliasConditionState = RUBBLE JAMMED
AliasConditionState = RUBBLE
End
; ***DESIGN parameters ***
DisplayName = OBJECT:TomahawkMissile
EditorSorting = SYSTEM
VisionRange = 0.0
ArmorSet
Conditions = None
Armor = ProjectileArmor
DamageFX = None
End
; *** AUDIO Parameters ***
;SoundAmbient = NukeCannonIncomingWhistle
; *** ENGINEERING Parameters ***
KindOf = PROJECTILE
Body = ActiveBody ModuleTag_02
MaxHealth = 100.0
InitialHealth = 100.0
End
Behavior = PhysicsBehavior ModuleTag_05
Mass = 1 ; we can't have a zero mass, but we want it pretty tiny...
End
; Behavior = DumbProjectileBehavior ModuleTag_07
; ; To tweak a Bezier path, please see GS
; FirstHeight = 700 ; Height of Bezier control points above highest intervening terrain
; SecondHeight = 700
; FirstPercentIndent = 30% ; Percentage of shot distance control points are placed
; SecondPercentIndent = 80%
; FlightPathAdjustDistPerSecond = 0 ; Can allow a max speed this can attempt to follow a target. Units are their velocity we can tag.
; End
Behavior = MissileAIUpdate ModuleTag_07
TryToFollowTarget = No
; FuelLifetime = 9999999999
IgnitionDelay = 0
InitialVelocity = 300
DistanceToTravelBeforeTurning = 200
; DistanceToTravelBeforeDiving = 300
DetonateCallsKill = Yes
KillSelfDelay = 2000
End
Locomotor = SET_NORMAL WarHammerShellLocomotor
Behavior = FireWeaponWhenDeadBehavior ModuleTag_Cluster01
DeathWeapon = WarhammerCannonCluster
StartsActive = Yes
End
Behavior = FireWeaponWhenDeadBehavior ModuleTag_Cluster02
DeathWeapon = WarhammerCannonCluster
StartsActive = Yes
End
Behavior = FireWeaponWhenDeadBehavior ModuleTag_Cluster03
DeathWeapon = WarhammerCannonCluster
StartsActive = Yes
End
Behavior = FireWeaponWhenDeadBehavior ModuleTag_Cluster04
DeathWeapon = WarhammerCannonCluster
StartsActive = Yes
End
Behavior = FireWeaponWhenDeadBehavior ModuleTag_Cluster05
DeathWeapon = WarhammerCannonCluster
StartsActive = Yes
End
Behavior = FireWeaponWhenDeadBehavior ModuleTag_Cluster06
DeathWeapon = WarhammerCannonCluster
StartsActive = Yes
End
Behavior = FireWeaponWhenDeadBehavior ModuleTag_Cluster07
DeathWeapon = WarhammerCannonCluster
StartsActive = Yes
End
Behavior = FireWeaponWhenDeadBehavior ModuleTag_Cluster08
DeathWeapon = WarhammerCannonCluster
StartsActive = Yes
End
Behavior = FireWeaponWhenDeadBehavior ModuleTag_Cluster21
DeathWeapon = WarhammerCannonCluster
StartsActive = Yes
End
Behavior = FireWeaponWhenDeadBehavior ModuleTag_Cluster22
DeathWeapon = WarhammerCannonCluster
StartsActive = Yes
End
Behavior = HeightDieUpdate ModuleTag_042
TargetHeight = 5.0
TargetHeightIncludesStructures = No
OnlyWhenMovingDown = Yes
InitialDelay = 1000
DestroyAttachedParticlesAtHeight = 25.0
End
Geometry = Sphere
GeometryIsSmall = Yes
GeometryMajorRadius = 1.0
End
Object WarHammerCannonShellCluster
; *** ART Parameters ***
Draw = W3DModelDraw ModuleTag_01
ConditionState = NONE
Model = AVTankShel
End
End
; ***DESIGN parameters ***
DisplayName = OBJECT:TankShell
EditorSorting = SYSTEM
ArmorSet
Armor = ProjectileArmor
End
VisionRange = 0.0
; *** ENGINEERING Parameters ***
KindOf = PROJECTILE NO_COLLIDE
Body = ActiveBody ModuleTag_02
MaxHealth = 10000000000.0
InitialHealth = 10000000000.0
End
Behavior = PhysicsBehavior ModuleTag_04
Mass = 1
End
Behavior = DestroyDie ModuleTag_03
;nothing
End
Behavior = DumbProjectileBehavior ModuleTag_08
TumbleRandomly = Yes
FirstHeight = 20
SecondHeight = 55
FirstPercentIndent = 30% ; Percentage of shot distance control points are placed
SecondPercentIndent = 60%
FlightPathAdjustDistPerSecond = 0 ; Can allow a max speed this can attempt to follow a target. Units are their velocity we can tag.
End
Geometry = Sphere
GeometryIsSmall = Yes
GeometryMajorRadius = 1
Scale = 0.66
End
Also, I'll drop the Locomotor I use for the projectile (note: it's meant to make a fake artilery shell fly path)
Locomotor WarHammerShellLocomotor
Surfaces = AIR
Speed = 600 ; in dist/sec
MinSpeed = 300 ; in dist/sec. (THRUST items must have nonzero minspeeds!)
Acceleration = 1000 ; in dist/(sec^2)
Braking = 0 ; in dist/(sec^2)
TurnRate = 540 ; in degrees/sec
MaxThrustAngle = 45 ; in degrees (NOT degrees/sec)
AllowAirborneMotiveForce = Yes
Appearance = THRUST
PreferredHeight = 1200
AirborneTargetingHeight = 30
;Note, PreferredHeight and DistanceToTargetBeforeDiving work in tandem for missiles.
PreferredHeightDamping = 0.7 ; so that we gradually adjust our height
End
And the problem is that the little cluster bombs have a random (literally, regardless of whether landing on flat ground, on target, or via special power) chance of exploding without 'tumbling randomly' - i.e immediately after the main explosion, and in exact same position.
Any1 will challange himself to help me with this crap ?
P.S. does any1 knows why in the 'Main' weaponobject I had to disable two parts of MissileAIupdate? I've got them enabled in
here (last post), and they just crash the game now.
Edited by user
14 years ago |
Reason: Not specified