What are the differences between the "walk hero " command and "walk to X/Y" command?

From OHRRPGCE-Wiki
Jump to navigation Jump to search

walk hero takes a hero, a direction and a length, and makes the hero walk that many tiles in that direction. walk hero to X and Y, however, take a hero, and an X/Y value, and makes the hero walk to that X/Y column/row.

Walkhero.png

Let's say that the red dot on that graph represents Bob the Hamster. He is at the coordinates (4,4). Now, let's suppose we issue him the command "walk hero(bob, up, 2)". That, as you can see, will cause him to walk north for two squares, until he arrives at the blue dot, (4,2). We could have done the same thing with "walk hero to Y(bob, 2)".

"walk hero" is known as a relative movement command ("go so many squares in this direction, wherever you may be now"), while "walk hero to X" is known as an absolute movement command ("Go to this specific coordinate"). ]] ]]