Mouse position
#1

Is it possible to detect mouse position while player is in spectate mode? There is an old experimental script by iPLEOMAX ( http://pastebin.com/aeFaYY2N ) but it's not very efficient. Are there some new methods of getting mouse position on screen grid?
Reply
#2

Thats the only way it's possible, by getting the camera front vector to move the mouse, which is no real mouse.

There is no explicit function for getting the mouse position directly, only through clickable textdraws.
Reply
#3

Well, damn. I wanted to create simple drag&drop but I can get position only onclick using textdraws. Maybe in near future...
Reply
#4

Well you could get to work "drag and drop" by clicking whatever you want to drag and then clicking the destination as second.
Reply
#5

Of course, but this isn't fancy enough
Reply
#6

You could detect the mouse position onplayerupdate and move the textdraw there ! Which would create a 'drag and drop' effect!
Reply
#7

Well, the problem is that I _can't_ detect the mouse position. I wanted to port good ol' javascript drag and drop (using onmousemove event with debouncer), but there isn't function in pawn which would return mouse coordinates. You can only emulate it while player is not spectating, and by getting position of textdraw which gets clicked.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)