Command friends to move to specific position


#1

Hello,

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?

Thanks


#2

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});