[General] Unit Selection Subgroups

Status
Not open for further replies.
Level 14
Joined
Jan 10, 2023
Messages
247
Hello,

So the question is one I don't have much hope for, but then again I'm pretty new to the Hive so maybe it's easy for someone else.

When selecting multiple Units of different types, can I find which Unit's Command Card is being viewed by the Player?
Example: I select a Paladin a Rifleman and a Peasant; The Paladin's Command Card is shown by default until I click the Rifleman or Peasant.
Is there a way to determine if the Player selected the Rifleman and is viewing the Rifleman's Command Card now, while keeping the same three units selected?


I've tried detecting a button-frame-click on the 'multiple unit' detail icon, and I've tried seeing if the 'Player X selects a unit' and/or 'Unit is selected' events fire when the player changes the highlighted unit, but it would seem the event does not re-fire and I've had no luck detecting the button-frame-click (using FRAMEEVENT_MOUSE_UP)

I'm guessing there is a frame that is blocking my button click, or maybe the icons aren't detectable buttons? Or maybe I just am totally out of reckoning...
 
Level 14
Joined
Jan 10, 2023
Messages
247
Thanks, I'll check it out.

So far I've been messing around with trying to get the unit/unit-type by using the frame text of 'SimpleNameText', but still no way to 'refresh' when another unit of the same selection is clicked, maybe I'll find something better there... figures I've been knee deep in JASS with zero Lua, hopefully it's nothing exclusive, to my knowledge they are equally capable, right?

EDIT: Looks like exactly what I need, thank you!
 
Status
Not open for further replies.
Top