hey, so i wanted to make it so you have one all purpose cursor where you interact with left click and then move on right click
this is the code -->
function on_mouse_click(MouseButton button) {
if (IsGamePaused() == 1) {
return;
}
if (button == eMouseRight) {
player.Walk(mouse.x, mouse.y);
} else if (button == eMouseLeft) {
Room.ProcessClick(mouse.x, mouse.y, mouse.Mode);
}
}
it works, but the issue is that in certain rooms it just doesn't, and the player can't go past a certain point for seemingly no reason? i know its an issue with the right clicking part because it works when i use arrow keys. help appreciated :o)
For scrolling rooms to work you need to add the camera offset (i.e. convert the mouse's screen coordinates to room coordinates).
player.Walk(mouse.x + Game.Camera.X, mouse.y + Game.Camera.Y);