• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Getting pos. of mouseeee

Status
Not open for further replies.
Level 19
Joined
Aug 8, 2007
Messages
2,765
I am making a trigger where u hold down the right mouse button and the unit plays the attack animation towards the mouse and shoots. the only problem is, i can only retrieve the position of the click, not the mouse, is there a way to retrieve the position of the mouse when you dont click?
 
Level 7
Joined
Sep 24, 2008
Messages
281
I'm certain that there is, as a developer mentioned during the galaxy editor showcase that they had a 3rd person game type in which the mouse could be used to look around. I'll get back to you in a minute:

I believe this might do the trick:

(Event) Camera- Turn camera mouse rotation On for player 1
 
Level 19
Joined
Aug 8, 2007
Messages
2,765
let me make myself clearer...

i need to put a point at the x,y values of the mouse
 
Level 11
Joined
Aug 1, 2009
Messages
963
Yeah, Blizzard brilliantly decided to not allow us to track mouse position. Furthermore, you cannot force mouse clicks.

You can't use camera pitch/yaw either. It would cause your camera to jump around a lot, which would be annoying as shit when playing.
 
Level 7
Joined
Sep 24, 2008
Messages
281
is it possible to track the mouse if the button is being held down?

Check out the "Sniper 2," its in there somewhere... :thumbs_up:

Also- I now retrieve is mispelled! I was in a hurry :xxd:

Credit: This is from the map "Perdition." I forget the authors name, but I happen to have this on hand since I've adapted it into my map.
 

Attachments

  • Retreve mouse position thing.SC2Map
    88.1 KB · Views: 80
Level 11
Joined
Aug 1, 2009
Messages
963
No, that is just using the camera pitch/yaw. It does not actually track the mouse position, it tracks the angle of the camera which is dependent on where the mouse is. This makes it rather useless for anything beyond third/first person shooters.
 
Status
Not open for further replies.
Top