Code: Select all
defineObject{
name = "glass_ball",
baseObject = "base_item",
components = {
{
class = "Model",
model = "assets/models/items/power_gem.fbx",
},
{
class = "Item",
uiName = "Tome of Health",
description = "A thick glass ball, somthing seems to be inside.",
gfxIndex = 157,
weight = 2.0,
traits = { "ball" },
},
{
class = "UsableItem",
sound = "level_up",
onUseItem = function(self, champion)
hudPrint(champion:getName().."found an Iron Key")
champion:insertItem(7, iron_key)
return true
end,
},
},
}
bad argument #2 to 'insertItem' (ItemComponent expected, got ???)