Do you have multiple objects named “pot” on the map? In the case of multiple objects with identical names MTE appends numbers to them so that they don’t conflict in the sprite table.
Looking over the code, a small bug in addSprite (which drawObject calls) is appending 1’s to objects with unique names. You need to find this section of code in addSprite, at line 1375:
local spriteName = setup.name if not spriteName or spriteName == "" then spriteName = ""..sprite.x.."\_"..sprite.y.."\_"..layer end if sprites[spriteName] then local tempName = spriteName local counter = 1 while sprites[tempName] do tempName = ""..spriteName..counter counter = counter + 1 end spriteName = tempName end
And replace it with the following:
local spriteName = sprite.name or setup.name if not spriteName or spriteName == "" then spriteName = ""..sprite.x.."\_"..sprite.y.."\_"..layer end if sprites[spriteName] and sprites[spriteName] ~= sprite then local tempName = spriteName local counter = 1 while sprites[tempName] do tempName = ""..spriteName..counter counter = counter + 1 end spriteName = tempName end
That will prevent random 1’s from appearing at the end of your object names. As for retrieving the properties, the next update will include the Tiled object’s property table in the sprite it creates. You can make this change yourself by adding this line of code to mte.lua at line 6535:
sprites[spriteName].properties = object.properties
After making these changes you’ll be able to get the properties at event.other.properties.