Okay, You need a rail for each place you want to go. Setting up the rails could be a pain, but there are ways to automate it but easier to hard code it for short rails, IMO.
Here's an example of what you might like to do. As long as you are relatively close to your starting node like you say, it should be able to move to the first node without problem. If not, we can implement 'find starting node' function or something that handles difficult moves...
set %RailOneX1 100
set %RailOneY1 300
set %RailOneX2 110
set %RailOneY2 300
set %RailOneX3 110
set %RailOneY3 290
set %RailOneCnt 3
set %RailTwoX1 100
set %RailTwoY1 300
set %RailTwoX2 90
set %RailTwoY2 300
set %RailTwoX3 90
set %RailTwoY3 310
set %RailTwoCnt 3
set %RailThreeX1 100
set %RailThreeY1 300
set %RailThreeX2 110
set %RailThreeY2 300
set %RailThreeX3 110
set %RailThreeY3 290
set %RailThreeCnt 3
while #true
{
onhotkey 1
gosub MoveRail RailOne
onhotkey 2
gosub MoveRail RailTwo
onhotkey 3
gosub MoveRail RailThree
}
halt
sub MoveRail
namespace push
namespace local MR , #systime
set !Cnt %1 , Cnt
set !Cnt % . !Cnt
set !SX %1 , X
set !SY %1 , Y
display ok !Cnt
for !i 1 !Cnt
{
set !nX !SX , !i
set !nY !SY , !i
set !nX % . !nX
set !nY % . !nY
move !nX !nY 1 5s ;you might have to adjust timeout depending on move length
}
namespace clear
namespace pop
return