• 🏆 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!

(Unsolvable?) Detect Pre-Selected Objects

Status
Not open for further replies.
Level 39
Joined
Feb 27, 2007
Messages
4,994
What do you mean by ‘preselected’? You can always get “units currently selected by <player>” at any time.

If you mean “units in a drag select box before the lmb is released and they are actually selected” the only way you’re gonna get that is by tracking mouse position and button presses.
 
Level 11
Joined
Feb 23, 2009
Messages
577
You can't select or drag select in my map (you're stuck on your hero forever).

Basically, when you hover over a unit the pre-selection circle appears, that's what I need to get.

The problem with mouse position is that flying units can be stacked :/ ... but only one is actually pre-selected (has the circle around it).
 
Level 39
Joined
Feb 27, 2007
Messages
4,994
I don't think you have any other option than checking coords and getting a unit beneath them. Maybe on an older patch that allows memhack you could grab this info but nothing actually happens that the game can detect when you do this.
 
Level 11
Joined
Feb 23, 2009
Messages
577
It's hard to explain, but I'm using the right and left click functions for my new system.
Right click attacks, and right now it attacks when you pick up items as well, there's also other reasons why I wanted it (for more left click functionality without being too intensive).
 
Status
Not open for further replies.
Top