Play Home Contribute GitHub Join Us Discourse Staff Members GitHub Contribution Guides Team

Command friends to move to specific position



I am trying to command my allies to move to specific position by saying

    for(var friend in friendArr)
        this.say(friendArr[friend].id +" move to: " + position); 
        friendArr[friend].target = null;
        friendArr[friend].targetPos = position;    

But it doesn’t seem that effect anything.

Is there any suggestions?



In multiplayer matches (is this Dungeon Arena or Brawlwood?), you can’t set variables on your friends–the API protection prevents that. You can give the targetPos in the data argument to this.say though:

this.say(friendArr[friend].id + " move to: " + position, {targetPos: position});