Don't automaticly move character in walk mode

Started by Alynn, Sat 20/12/2003 18:19:02

Previous topic - Next topic

Alynn

Ok, I have to have this option turned on for a few special movements (like when the character walks from the first to the second floor in my first room). Walking is accomplished with this script
Code: ags
if (GetCursorMode()==0){
      MoveCharacter(0, mouse.x, mouse.y);
    }
    else {
      ProcessClick(mouse.x, mouse.y, GetCursorMode());
    }


This works except for my scrolling rooms, which he will only walk so far into the screen (im assuming at 240 pixels) is there a way to turn that off for some rooms, or anyone know of a better work around than what I am using?

Thanks.

Scorpiorus

You see, the mouse.x/y ranges are within (0,319) (0,239) but in a scrolling room coordinates may be greater:

if (GetCursorMode()==0){
MoveCharacter(0, GetViewportX()+mouse.x, GetViewportY()+mouse.y);
}
else {
ProcessClick(mouse.x, mouse.y, GetCursorMode());
}

~Cheers

Alynn

Horray... I kept looking just couldnt figure that one out...

*Warning memory capacity is full*

Time to make more room, lets see, wife's birthday and aniversery date, I dont need those...

* Alynn Shift+Del's

SMF spam blocked by CleanTalk