ID:155965
 
MouseEntered() is called only when mouse enters object, but if I move mouse inside the object I won't know if it's at pixel position 1,1 or 31,31, or anywhere between. Is there any way to know or find out exact mouse position in pixels?

Sorry if I failed to explain =p
Hm, I'm interested in this as well. I hope it's not something like you would need to make every pixel an object...
In response to CauTi0N (#1)
This would be very interesting to figure out damage done with a click onto a enemy mob, like a head shot for instance... interesting
In response to MadHacker (#2)
Exactly - a huge update for Decadance.
In response to MadHacker (#2)
MadHacker wrote:
This would be very interesting to figure out damage done with a click onto a enemy mob, like a head shot for instance... interesting

For clicking, you can use the icon-x and icon-y params passed to determine where exactly the atom was clicked.

Their problem is more-so that no mouse process is called when moving it within one tile.

As to the original problem, I believe there is a work around involving Javascript, but I don't know how pretty it would be.

Also, MouseEntered is a rather slow process, even for single-player games (and so would be the Javacript workaround, most likely). I would suggest you reconsider the mechanic to avoid that type of input all together. Maybe use a paired set of clicks to draw a straight line, as it would be more responsive.
In response to DarkCampainger (#4)
DarkCampainger wrote:
As to the original problem, I believe there is a work around involving Javascript, but I don't know how pretty it would be.

It's not at all pretty. I included mouse coordinate support in my dusty old KeyState library even though that's not what the library's perpose was. Since the javascript connection was already made, I threw in mouse coordinates, monitor resolution and OS.

The way I handled it all wasn't the greatest, and I think you could get a better and more responsive javascript connection going, but I never got around to doing that.

Also, MouseEntered is a rather slow process, even for single-player games (and so would be the Javacript workaround, most likely).

Yes, it was slow. As I said, it might be possible to speed it up, but still not likely enough for anything action-related.

FYI: if you do look into the library, don't bother with its main purpose (the KeyState stuff) as that's obsolete. It was just a way to have KeyUp/KeyDown actions for all the keyboard keys before we had proper support natively in Byond.