22-12-2006, 03:49 PM
Actualy it isn't that hard. I added 3 variables named MoveTo,MoveToX,MoveToY. MoveTo is setted to true when you click the screen and does not click on an npc or player. then, inside Sub CheckMovement() change the line "If IsTryingToMove Then" to "If IsTryingToMove Or MoveTo = True Then" and inside "Function CanMove()" you can add, right under "Dir = GetPlayerDir(MyIndex)" a check to see if MoveTo is true, liek this: "If MoveTo = True Then". If it is, it moves the player to the position wanted just using the AI you developed. To make it move just change the value of this 4 variables:
changing them from false to true, depending on the direction you want the player to go to.
Code:
DirUp
DirDown
DirLeft
DirRight
changing them from false to true, depending on the direction you want the player to go to.