Hi @Bill_Uncork-It ,
Thanks for reply.
The following is the code how I generate the objects:
const PICS:string[] =
["https://cdn.gather.town/storage.googleapis.com/gather-town.appspot.com/uploads/1tETsmYZSOjnNz0y/niNp15h1mjZ2LdYeg76qRk",
"https://cdn.gather.town/storage.googleapis.com/gather-town.appspot.com/uploads/1tETsmYZSOjnNz0y/0FwmaXqDyGB6z3qLQlBXlN",
"https://cdn.gather.town/storage.googleapis.com/gather-town.appspot.com/uploads/1tETsmYZSOjnNz0y/JE8uTkGQ3CSGtM9xCC9WX0",
"https://cdn.gather.town/storage.googleapis.com/gather-town.appspot.com/uploads/1tETsmYZSOjnNz0y/THBxmWLT0OZMxFXsrJtrvC",
"https://cdn.gather.town/storage.googleapis.com/gather-town.appspot.com/uploads/1tETsmYZSOjnNz0y/ft4ax63kmANwnlalYgkrzX",
"https://cdn.gather.town/storage.googleapis.com/gather-town.appspot.com/uploads/1tETsmYZSOjnNz0y/foanLdcahzHmpsMw3V6f4h",
"https://cdn.gather.town/storage.googleapis.com/gather-town.appspot.com/uploads/1tETsmYZSOjnNz0y/cttvBBa0jZYFfcMcE33X4b"];
function createCards():void
{
allCards = [];
let timeCounter = 0;
let x = 10;
let y = 10;
// Init cards
for(let index = 0; index < PICS.length; index++)
{
let objId = "CARD_" + index;
let obj =
{
id: objId,
normal: PICS[index],
x: x + index*2,
y: y,
type: 5,
width: 2,
height: 2,
distThreshold: 0,
previewMessage: "Space",
};
allCards.push(objId);
setTimeout(() =>
{
game.setObject(MAP_ID, objId, obj);
}, timeCounter*100);
timeCounter += 1;
}
}
And I have tried check the game.completeMaps[MAP_ID].objects contents as following:
just two objects in it:
{
'0': {
x: 10,
y: 6,
normal: 'https://cdn.gather.town/storage.googleapis.com/gather-town.appspot.com/uploads/1tETsmYZSOjnNz0y/ZY9gGj3i7fFN9Zy0QfTW26',
type: 5,
width: 2,
height: 2,
previewMessage: 'Space',
distThreshold: 0,
id: 'BUTTON_CREATE',
objectPlacerId: 'zGuziCXsQnSIp123pH7ERqFiLYS2',
properties: {},
key: 0
},
'1': {
x: 14,
y: 6,
normal: 'https://cdn.gather.town/storage.googleapis.com/gather-town.appspot.com/uploads/1tETsmYZSOjnNz0y/xebaGrEsNolThsQwM1UAem',
type: 5,
width: 2,
height: 2,
previewMessage: 'Space',
distThreshold: 0,
id: 'BUTTON_DELETE',
objectPlacerId: 'zGuziCXsQnSIp123pH7ERqFiLYS2',
properties: {},
key: 1
}
}
CARD_6
I will send you the code in message,
Thank you!