Hello!
I’m new to gather.town ecosystem, and I’m trying to play with it’s API.
My problem is with mapSetObjects
event, that is having no effect and no error is thrown.
I try game.setObject(...)
and game.sendAction({$case: "mapSetObjects",...})
, in the app.gather.town page’s console and on a node script without look.
Both node and browser’s console can correctly create an object with game.sendAction({$case: "mapAddObject",...})
, but not with game.setObject(...)
.
I have tried to update the “normal” image and the position, without effect.
My updating is like that:
game.sendAction({
$case: "mapSetObjects",
mapSetObjects: {
mapId: MAP_ID,
objects: { [objId]: { // objId is the same used on mapAddObject
"id": objId,
"height": 1,
"width": 1,
"distThreshold": 1,
"x": 37,
"y": 27,
"type": 5,
"previewMessage": "MEOOOOWWW",
"normal": "data:image/png;base64,xxxxxxxxxx",
"customState": "tree",
"_tags": []
} }
}
})
Where I’m wrong?