I'm trying to make a special item which create a teleporter when use it.
I tried and tried many different methods but I can't find how to...

I think I must use the onUseItem function in the defineObject but it don't works.... please help

Code: Select all
defineObject {
name = "chaos_staff",
class = "Item",
uiName = "Chaos staff",
model = "mod_assets/models/cs.fbx",
description = "The legendary Chaos staff. Only this staff can defeat the Dark Soul.",
gfxAtlas = "mod_assets/textures/cs.tga",
gfxIndex = 4,
weight = 6.66,
onUseItem = function(self, champion)
print ( "ok" )
playSound("consume_potion")
return true
end,
}