Moderator: MacroQuest Developers
Code: Select all
for (x=$char(x),y=$char(y); x<=destX, y<=destY; ++x, ++y)
/face loc x,y
/press down up
next
Yeah, but like a classic programmer I never read the manual...kaz wrote:rofl, this is classic, honestly no offense McKorr but its hillarious when a MQ "Dev" asks to have a feature added thats already there.
If I understand the readme correctly (see, I went back and read it), you can increment by any value you want using Step. The problem with your above example is that the current for/next loop does not handle arrays, meaning nested loops and calculations to accomplish the same thing.In a real for loop, you can increment more then +1, you can add by 5, divide by 10, whatever math seems reasonable. Some languages let you call functions to do the math for you.