- Joined
- Jan 15, 2014
- Messages
- 1,317
- Solutions
- 35
- Reaction score
- 434
Hello,
Is it possible to save houses one at a time? The goal is to save the house every time a player moves an item in that house.
Thanks for your help!
Is it possible to save houses one at a time? The goal is to save the house every time a player moves an item in that house.
Code:
function Player:onMoveItem(item, count, fromPosition, toPosition)
-- save house
local houseTile = Tile(toPosition)
if houseTile then
local house = tile:getHouse()
if house then
house:save() <-- I just made that up but it's what I'm looking for, like player:save()
end
end
return true
end
Thanks for your help!