the best 2 possibilities are:
- via LifetimeUpdate, as long as this object DOESN'T use a WeaponSet (objects with both in the code can't use the weapon of the WeaponSet tag)
- via FireWeaponUpdate (e.g. the ECM and microwave tanks have these)
You only have to define a weapon like this:
Code:
Weapon SpecialPowerKillObjectWeapon
PrimaryDamage = 1
PrimaryDamageRadius = 10
AttackRange = 15
DamageType = MELEE ;I chose this type for no visual effects at death
DeathType = NORMAL
WeaponSpeed = 999999
RadiusDamageAffects = SELF SUICIDE
DelayBetweenShots = 1000 ;the time between 1st and 2nd hit (here 1 sec)
ClipSize = 2
ClipReloadTime = 0
AutoReloadsClip = No
End
How this works:
The weapon fires once immediately when the object exists but DOESN'T kill it. "DelayBetweenShots" defines when the second and final hit comes and "ClipSize" of 2 makes it possible that this suicide weapon needs a second shot to really destroy the object.
Maybe you must play a little bit with the hit points of the object (but I don't think so). That means you definetly need an "ActiveBody" tag.