I use
player.FaceLocation(x,y);
and at some random places the character doesn't face the right location
o/
Could you give some more code? When does this occur?
Are you sure you don't mix up x and y?
Keep in mind that FaceLocation expects screen coordinates, so if you have a scrolling room, you have to substract GetViewportX and GetViewportY from room coordinates (object coordinates, character coordinates, hotspot walk-to points etc.):
player.FaceLocation(oDoor.X - GetViewportX(), oDoor.Y - GetViewportY());
i have a scrolling room
i tryed:
guicoinmouseclickx = mouse.x;
guicoinmouseclicky = mouse.y;
and then
player.FaceLocation(guicoinmouseclickx-GetViewportX(),guicoinmouseclicky-GetViewportY());
but it didnt work
o/
Mouse coordinates already are screen coordinates, so you don't have to substract the viewport position for them. Ignore my suggestion then.
To quote [...]:
QuoteCould you give some more code? When does this occur?
it worked now:
player.FaceLocation(GetViewportX()+mouse.x,GetViewportY()+mouse.y);
mouse gets screen coordinates and facelocation uses room coordinates
thanks for the help
o/
Quotefacelocation uses room coordinates
Not according to the manual, but you're right, it does. Good work!