Help with moving character

Started by myname, Sat 06/10/2007 18:41:03

Previous topic - Next topic

myname

I have my walkable area one linear horiazontal line on every room ie. "Duty and Beyond".  The probem is I have to click exactly on the walkable line to move at all and since the resolution is low at 320x200 this is a annoying task to move the character.  Is there a way to get around this like having the player clck in the direction and have the character walk that way no matter if the they click on the walkable area line or not.  Any help woould be greatly appreciated.

Khris

The pathfinding expects walkable areas at least 3 pixels wide.

To solve your problem, intercept the Walkto-click in on_mouse_click:

Code: ags
  if (button==eMouseLeft) {
    if (mouse.Mode!=eModeWalkto) ProcessClick(...);  // default behavior
    else {
      player.Walk(mouse.x+GetViewportX(), player.y);
    }

    ..


SMF spam blocked by CleanTalk