moveMapObject only works sometimes

reposting from @Bill_Uncork-It in another channel:

[API Bug] I am using the Websocket API to run a moveMapObject command, and the command appears to work in some rooms, but not others. The code is exactly the same, except the room id has been changed. I am guessing that some other extension (Go-Karts appears to have been spitting out errors) is causing an issue in the animation of the movement. Any feedback or affirmation that this bug exists would be greatly appreciated.

no, this is unexpected. what error are you getting and what’s the behavior you see instead?

also can you send the spaceId, roomIds, and code snippet I can use to repro and fix this please?

Thanks for posting this here.

When I run my code, I do not see any errors or feedback at all. Instead, the objects simply act differently in the two rooms. I have checked the network activity as well as the console log, and nothing appears different between the two locations. I will DM you the info you have requested, as the space info is from our office.
EDIT: Guess I should explain HOW they are different: In the working room, the object ‘slides’ as expected. In the broken room, the object just teleports, as if only setObject were run to change the x/y of the object.

As for a snippet:

let objId = /*OBJECT ID*/;
let mapId = /*MAP ID*/;
let rest = false;
let objMoveTimer = setInterval(async () => {
        let endPos = posArray[Math.floor(Math.random()*posArray.length)]
        let currObj = game.getObject(objId!,mapId);

        if(currObj && endPos.x < currObj.obj!.x){
            currObj!.obj!.spritesheet!.spritesheetUrl = spritesheet.left;
            currObj!.obj!.spritesheet!.spritesheetUrl = spritesheet.right;

        let moveSpeed = 1000+Math.floor(Math.random()*3000);

        if(currObj && !rest){
            await delay(200);
            await game.setObject(mapId, objId!, currObj!.obj!, true)
            await delay(200);
            game.moveMapObject(mapId, objId!, {x:endPos.x, y:endPos.y}, moveSpeed, "Linear")
            await delay(moveSpeed);

            if(moveSpeed > 3900){
                rest = true;
        }else if(rest){
            rest = false;

    }, 4000)
function delay(ms: number) {
    return new Promise( resolve => setTimeout(resolve, ms) );

I have modified the snippet variables a bit for agnostic use. The setObject spritesheet changes work in both rooms, so I assume this is not the issue. I have included it in case there is something linked. ( I am also forcing a bunch of the variables to be assumed defined, so TS doesn’t whine while I am building proof of concept. Hopefully that is not the root issue. )


Just wanted to note the Go-Kart error came back after a few karts ended up abandoned in the office. The error is:

generateFrameNames: Frame missing: /images/particles/gokart-dust.png-0 from texture: atlas-1feghv4595g