Get characters screen coordinates

Started by DrewCCU, Thu 10/06/2010 20:35:51

Previous topic - Next topic

DrewCCU

I need to figure out how to get a characters screen coordinates (NOT room coordinates, as my room is larger than the screen resolution).

I looked into the Character.GetAtScreenXY code but that seems that it only checks if there is a character at screen coordinates but i dont need to check and see if a character is at a specific location ... i need to figure out where the character is in terms of screen coordinates.
"So much of what we do is ephemeral and quickly forgotten, even by ourselves, so it's gratifying to have something you have done linger in people's memories."
-John Williams

discordance

You can just subtract the viewport x and y from their coordinates, i.e.

Code: ags

player.x - GetViewportX(),player.y - GetViewportY()

DrewCCU

"So much of what we do is ephemeral and quickly forgotten, even by ourselves, so it's gratifying to have something you have done linger in people's memories."
-John Williams

SMF spam blocked by CleanTalk