In most cases, any command that affects any attribute of the affected unit will work only if the unit is local (setPos, setDir, serVectorDir, setVelocity, setVectorUP, setFuel, move, doMove). That includes also any command that affect unit behaviour, combat mode or actions. So, the general rule is that you cannot affect via commands a unit that is not local to where the commands are executed.