Page 1 of 1

goto command in waypoints

Posted: Sat Apr 27, 2013 2:42 am
by Jig
Hello,

is it possible to use a "goto line xy" command to jump between lines in the same .xml?

example:

Code: Select all

(line 1 )

waypoint 1
waypoint 2
waypoint 3
jump to line 3

(line 2 )
doanything then jump to line 1 else line 3

(line 3 )

blabla
jump to line 1
or better like the goto like in c++ ;)

Re: goto command in waypoints

Posted: Sat Apr 27, 2013 4:54 am
by rock5
Are you talking about jumping to certain waypoints or actual goto a line in lua code?

Jump to waypoint

Code: Select all

__WPL:setWaypointIndex(number)
Goto lua line, now available in lua 5.2 which is what Micromacro 1.03 uses. I haven't used goto yet so I'm not sure of the syntax. Look it up. Although I suspect, most of the time, if you program correctly you shouldn't need to use 'goto'.

Re: goto command in waypoints

Posted: Sat Apr 27, 2013 6:07 am
by wps
There is a "tag" attribute for readability.

<waypoint x="x" z="z" y="y" tag="goto_Quest"> </waypoint>

__WPL:setWaypointIndex(__WPL:findWaypointTag("goto_Quest"));

Re: goto command in waypoints

Posted: Sat Apr 27, 2013 11:03 am
by Jig
i will test it in a few hours with a profile, but thank you very much again. When i have a problem i will reply.