Trying to add a boss monster which gets healed instead of damaged when it has a certain outfit:
I've added the script...
[TFS 1.3] What could be wrong with this onHealthChange?
Lua:
function onHealthChange(creature, attacker, primaryDamage, primaryType, secondaryDamage, secondaryType, origin)
if attacker then
if creature:getOutfit() == 9 then
primaryDamage = -primaryDamage
secondaryDamage = -secondaryDamage
end
end
return primaryDamage, primaryType, secondaryDamage, secondaryType
end
[TFS 1.3] What could be wrong with this onHealthChange?