Trying to add a boss monster which gets healed instead of damaged when it has a certain outfit:
I've added the script to the creature, but it won't execute correctly, it does work however since if I make an error and attack the monster I get a console output
.
Something is wonky with creature:getOutfit() but I have no idea what.
9 is the lookType it should heal on.
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
I've added the script to the creature, but it won't execute correctly, it does work however since if I make an error and attack the monster I get a console output
.
Something is wonky with creature:getOutfit() but I have no idea what.
9 is the lookType it should heal on.