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?
Add teamID in Explosion call-in and AddDamage call-out
Moderator: Moderators
Re: Add teamID in Explosion call-in and AddDamage call-out
zwzsg wrote:Loosely related, but is it possible to delete a shot in mid-air
Code: Select all
Spring.SetProjectileCollision(projectileID)
Re: Add teamID in Explosion call-in and AddDamage call-out
KDR_11k just taught me that return true in gadget:Explosion makes the CEG not appear.
-
- Moderator
- Posts: 2464
- Joined: 12 Oct 2007, 09:24
Re: Add teamID in Explosion call-in and AddDamage call-out
Code: Select all
gadget:Explosion(weaponID, px, py, pz, ownerUnitID, ownerTeamID)
Re: Add teamID in Explosion call-in and AddDamage call-out
Loosely related: what exactly is an explosion? I tried to watch the flamethrower weapon but it isnt caught in gadget:Explosion even though set in Script.WatchWeapon.
Is flamethrower not applicable to explosions?
Is flamethrower not applicable to explosions?
-
- Moderator
- Posts: 2464
- Joined: 12 Oct 2007, 09:24
Re: Add teamID in Explosion call-in and AddDamage call-out
Your flamethrower probably has "noExplode = true".