emil92b
Intermediate OT User
im trying to make an open trap, close itself when thrown out of inventory
i have tried to do like this with onAddItem movement script, however it will then interfere with my onUse action script and close right after i open it, which i do not want.
are there any other way to solve this, or what am i missing?
i have tried to do like this with onAddItem movement script, however it will then interfere with my onUse action script and close right after i open it, which i do not want.
Lua:
function onAddItem(item, tileitem, position)
item:transform(item.itemid - 1) -- a closed trap
return true
end
are there any other way to solve this, or what am i missing?