Make the player face mouse coordinates in scrolling room [Solved]

Started by Khristian Cammilleri, Wed 01/05/2013 00:12:31

Previous topic - Next topic

Khristian Cammilleri

Hi AGS community
I think that the title is pretty much self-explanatory, but I will explain it anyways:
I've created the following function:
Code: AGS
function PlayerLookThings ()
{player.FaceLocation(mouse.x, mouse.y, eBlock);}


So everytime I run the interaction ''Look'', the player will face automaticaly the hotspot/object
Everything works fine in the non-scrolling rooms, because the mouse coordinates are 320x200..
My question is:
How could be a similar script for the scrolling rooms?? (more than 320x200 px)
PizzaNostra!

Khris

Code: ags
  player.FaceLocation(mouse.x + GetViewportX(), mouse.y + GetViewportY(), eBlock);

Khristian Cammilleri

Wow Khris, That was fast!
Thank you for being in the other side of the screen answering all my silly questions :) :grin:
PizzaNostra!


SMF spam blocked by CleanTalk