Page 1 of 1

LUA unitdamaged needs weaponID!!!!

Posted: 25 Sep 2007, 22:11
by Zpock

Code: Select all

function gadgetHandler:UnitDamaged(unitID, unitDefID, unitTeam,
                                   damage, paralyzer,
                                   attackerID, attackerDefID, attackerTeam)
As seen there's no way to know wich weapon was actually hitting. You could go trough LUACOB I guess, but that would be horribly inefficient, inconvenient and glitchyprone.

I'm planning on trying to overthrow springs damagesystem completly and make my own mechanics for it in LUA, so it's easy to add in resistances, armor, shields, damagemodifiers and whatnot.

Another workaround I would probably use is to use the standard damage as identifiers, tough this would probably be hard due to variations like the flanking damagebonuses and the like.