I know I can add these two hooks to a item(s) when thrown.
1 -
Code: Select all
onThrowAttackHitMonster = function(self, monster)
item_counter.counter:decrement()
--monster:setCondition("sleep", 20)
print("yes")
end,
2 -
Code: Select all
class = "UsableItem",
onUseItem = function(self, champion)
item_counter.counter:decrement()
end,
Is there a way to add a hook to the item(s) when the player throws the Item at walls, door, object etc.. and the item is destroyed when it hits these objects, then the item.counter.counter:decrements ??