Code: Select all
plotscript, Map Auto Run 1, begin
stopAllNPCs # This script uses "set NPC moves ()" to stop specified NPCs
While ( current map == current map ) do(
# For turn-based movement:
if(hero is walking (0)) then(
suspend player
resumeAllNPCs # This script uses "set NPC moves ()" to resume specified NPCs
wait # Must wait 1 tick before stopping NPCs
stopAllNPCs # This script uses "set NPC moves ()" to stop specified NPCs
wait for hero(me)
resume player
)
wait
)
end
My each step looks like this:
Code: Select all
plotscript, eachstep 0, begin
# Wait for everything to reach it's next position
wait for all
# Check spaces adjacent to hero
checkAdjacent
end