If you use MoveHeroRealTime, that's enough for an attack, but RealTime is RealTime; it will happen directly at any moment, possibly during the player's turn, and there will be no way to escape.
A regular MoveHero might require StartCombat, yes. Although I'm not sure, but it seemed to me that I encountered something like that.
Attractors don't work. If your heroes' behavior isn't rigidly defined and you need them to target something, even if only sometimes and imprecisely, an attractor might work, but it shouldn't be used for a rigid target. And even if it works normally for the map editor, there will most likely still be players for whom it won't work.
while 1 do
while not IsPlayerCurrent(desired_player) do
sleep()
end
MoveHeroRealTime(...)
sleep()
endAnd regarding CalcHeroMoveCost, I had a task to constantly check the distance between 2 heroes, and this function, when called in a loop, caused lag in the game, so I had to simply calculate the distance in cells