Forcing unit selection without hiding UI buttons

Level 7
Joined
Mar 16, 2014
Messages
163
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

  • TriggerTest.w3m
    16.9 KB · Views: 2
Level 7
Joined
Mar 16, 2014
Messages
163
After more testing in an empty test map I'm unable to reproduce it there.

I have removed the move, patrol, and stop buttons from my map. That's the only thing I can think of that might be causing this. Hold Position and Attack are still there.
 
Level 7
Joined
Mar 16, 2014
Messages
163
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.
 
Level 41
Joined
Feb 27, 2007
Messages
5,240
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.
 
Top