How to use API to make Agent walk?

I used teleport function, the agent can only move but I want it walk with animation.
How to use API to make Agent walk?

let i = 0;
setInterval(function () {

  game.engine.sendAction({ 
  $case: "teleport",
    teleport: {
      mapId: 'empty-room-medium-brick',
      x: currentX,
      y: currentY,
    },
  });
  currentX += XrandomArray[i];
  currentY += YrandomArray[i];
  i++;
},500);

123

Few things:

Is this ‘Agent’ an object, or actually a logged in avatar?

Is the ‘Agent’ the chacter that has the API key attached to it?

Have you checked out the ‘Twitch Plays Gather’ code example?

Few answers:

Currently, if the ‘Agent’ is not the API key holder, you cannot really force it to move. If it is the API key holder, then the “.move” command may help do what you are trying.

If the ‘Agent’ character is an object, you will have to manually animate it, moving from image to image based on direction it is moving.

Thanks.
The “.move” command is what I want.

OMG!! This is a good way to show the position!!! I’m going to add it to my tools. Thanks for the inspiration.