Add teamID in Explosion call-in and AddDamage call-out
Posted: 08 Nov 2011, 22:00
I implemented a handicap system where handicap results in damage multiplier between teams.
But KP implements Damage over Time (DoT) Area of Effect (AoE) weapons by using Script.SetWatchWeapon, gadget:Explosion, and Spring.AddUnitDamage.
I managed to workaround to rattach the damage to another unit of the same team when the unit that fired the shot before its DoT AoE expire.
However, when the unit dies before the shot explodes, I can't know which team does it belong, and thus a wrong damage modifier may be applied.
So it would be nice if instead of just:
gadget:Explosion(weaponID, px, py, pz, ownerID)
it was:
gadget:Explosion(weaponID, px, py, pz, ownerUnitID, ownerTeamID)
And it would be nice if Spring.AddUnitDamage had an extra parameter to pass an attackerTeamID even if there is no attackerUnitID.
So that I could retrieve the team dealing the damage from the gadget:UnitPreDamaged of the other gadget.
Loosely related, but is it possible to delete a shot in mid-air, or to prevent its CEG from triggering when it reaches ground?
But KP implements Damage over Time (DoT) Area of Effect (AoE) weapons by using Script.SetWatchWeapon, gadget:Explosion, and Spring.AddUnitDamage.
I managed to workaround to rattach the damage to another unit of the same team when the unit that fired the shot before its DoT AoE expire.
However, when the unit dies before the shot explodes, I can't know which team does it belong, and thus a wrong damage modifier may be applied.
So it would be nice if instead of just:
gadget:Explosion(weaponID, px, py, pz, ownerID)
it was:
gadget:Explosion(weaponID, px, py, pz, ownerUnitID, ownerTeamID)
And it would be nice if Spring.AddUnitDamage had an extra parameter to pass an attackerTeamID even if there is no attackerUnitID.
So that I could retrieve the team dealing the damage from the gadget:UnitPreDamaged of the other gadget.
Loosely related, but is it possible to delete a shot in mid-air, or to prevent its CEG from triggering when it reaches ground?