Problem with scrolling room

Started by fidodido, Tue 27/05/2003 22:09:43

Previous topic - Next topic

fidodido

I created a room in the size 900X480, and I set the walkable areas just right, but there's a problem: when I walk to the edge of the SCREEN, the character goes towards the point I clicked on, and the room is scrolling, BUT... the character stops in the 640 pixels limit, and I can't go further (when I click on a point ahead, the char goes back...)

What am I doing wrong?

Scorpiorus

Did you have something like this in your code:

MoveCharacter(GetPlayerCharacter(), mouse.x, mouse.y) ?

Gilbert

In that case the correct code is:

MoveCharacter(GetPlayerCharacter(), mouse.x + GetViewportX(), mouse.y + GetViewportY());

fidodido

I did what you said, and it works!

Thank you both very much, Gilbot and Scorpiorus.

SMF spam blocked by CleanTalk