Oneda
Aspiring Spriter
Hey guys! I got a small problem here, I made a real simple base gather system for TFS 1.2, which has a table for bush IDs on it, and I just CANT remember how do I use tables at all.
The problem is, how should I use " if target.itemid == " to get the IDs from that bushIds table?
Lua:
function onUse(player, item, fromPosition, target, toPosition, isHotkey)
local bushIds = {2769, 2768}
if target.itemid == bushIds then
target:transform(2781)
target:decay()
player:addItem(5467)
player:addItem(2244)
return true
end
return destroyItem(player, target, toPosition)
end
The problem is, how should I use " if target.itemid == " to get the IDs from that bushIds table?