• Check out the results of the Techtree Contest #19!
  • Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

Forcing unit selection without hiding UI buttons

Status
Not open for further replies.
Level 21
Joined
Mar 16, 2014
Messages
324
I have a problem. I am using the action "select X unit for player" function, but doing so gets rid of all of the UI buttons on the unit. I have to manually select another unit other than X, then select X manually to get the UI buttons. All UI buttons are gone including attack, move, hold position, etc, as well as abilities.

How do I force a player to select a unit without hiding the UI buttons?
 
Hmm I'm not getting that problem in this test map (press ESC to switch selected unit). Do you have any triggers to share? Or perhaps you can try reproducing it on a separate test map to see if there is something else involved that's causing a problem for you?
 

Attachments

I think I realize the issue. And no, add unit to selection instead of select unit doesn't do anything.

What I am doing is creating a unit when a unit casts a spell inside of a spellbook, and then instantly selecting that unit for the player. The issue is doing this leaves the player in some sort of weird state where the spellbook doesn't close, so they are left with the blank UI panel.
 
What I am doing is creating a unit when a unit casts a spell inside of a spellbook, and then instantly selecting that unit for the player. The issue is doing this leaves the player in some sort of weird state where the spellbook doesn't close, so they are left with the blank UI panel.
I can confirm that this is what's happening; messed with this a long time ago trying to make spells that could target multiple things at once. You could try using call ForceUICancel() before/after selecting the unit, but no guarantees on that.
 
Status
Not open for further replies.
Back
Top