Like this:
Label loop
Set var "_MyScriptX" = _MyX
Set var "_MyScriptY" = _MyY + 2
If ...
Wait for entity Monster 0,0,0,0
Set var "_MyScriptX" = -9999
Set var "_MyScriptY" = -9999
Move 0,1,1,0
Move 0,-1,1,0
If End
Set var "_MyScriptX" = -9999
Set var "_MyScriptY" = -9999
Wait 0
Go to loop
This particular script will check the tile two squares south of the character. If a monster crosses that tile, it steps south, then north. (I made it two squares to allow room for the character's sword.) To check other directions, change "
MyX"
to "
MyX - 2"
for west, "
MyX + 2"
for east, and change "
MyY + 2"
to "
MyY - 2"
for north. The movement commands will require a similar adjustment.
____________________________
50th Skywatcher
[Last edited by Nuntar at 06-26-2014 02:51 AM]