ProcessClick with character coordinates

Started by G, Mon 06/03/2006 16:12:50

Previous topic - Next topic

G

I have a simple question.

Does ProcessClick work with screen coordinates or with room coordinates?

I say it because I need to use the character coordinates to interact with hotpots.

Ashen

#1
Screen coordinates, although the manual entry is a little ambiguous. Basically, if a function can use (mouse.x, mouse.y), it's screen coordinates.
You'll need to use GetViewportX/Y() to compensate, e.g.:
Code: ags

ProcessClick(player.x-GetViewportX(), player.y-GetViewportY(), mouse.Mode);
I know what you're thinking ... Don't think that.

G


SMF spam blocked by CleanTalk