- Joined
- Mar 6, 2008
- Messages
- 898
Hiho,
I did some work on my LTW map and just implemented a small feature that makes it possible for the players to select some important units from their so-called builder.
So the player clicks on an ability button at his builder's command card and a certain unit (building) is selected.
So far so good.
However, the whole thing did not work as expected.
Whenever I clicked on my abilities in order to select such a unit, the unit got selected correctly, however had a blacked out command card which is very bad as I want to select it in first place to click on its command card buttons ...
This is a known bug and several other people have collected their experiences with it, however with no successful workaround to fix it.
So the easy way of adding and removing an ability to refresh tooltips does not work here.
But since this is an important feature for the map are there are other work arounds to solve this?
As code I used this:
Which is more or less equal to PlayerUnitSelectSinge (or what it is called) - a blizzard's implementation.
Regards,
Robbepop
EDIT: SOLVED
I was trying to select units with dummy abilities within a spellbook and found out that this was the source of my problem.
So before selecting a unit via SelectUnit(...) I had to make sure that the issuing unit cancels its spellbook to return to normal command card UI.
This required the following workaround as the normal cancellation command does not work:
This did it for me!
I did some work on my LTW map and just implemented a small feature that makes it possible for the players to select some important units from their so-called builder.
So the player clicks on an ability button at his builder's command card and a certain unit (building) is selected.
So far so good.
However, the whole thing did not work as expected.
Whenever I clicked on my abilities in order to select such a unit, the unit got selected correctly, however had a blacked out command card which is very bad as I want to select it in first place to click on its command card buttons ...
This is a known bug and several other people have collected their experiences with it, however with no successful workaround to fix it.
So the easy way of adding and removing an ability to refresh tooltips does not work here.
But since this is an important feature for the map are there are other work arounds to solve this?
As code I used this:
JASS:
if p == GetLocalPlayer() then
call ClearSelection()
call SelectUnit(myUnit, true)
endif
Which is more or less equal to PlayerUnitSelectSinge (or what it is called) - a blizzard's implementation.
Regards,
Robbepop
EDIT: SOLVED
I was trying to select units with dummy abilities within a spellbook and found out that this was the source of my problem.
So before selecting a unit via SelectUnit(...) I had to make sure that the issuing unit cancels its spellbook to return to normal command card UI.
This required the following workaround as the normal cancellation command does not work:
JASS:
function CancelSpellbook takes unit u returns nothing
call IssueImmediateOrder(u, "stop")
call PauseUnit(u, true)
call PauseUnit(u, false)
endfunction
This did it for me!
Last edited by a moderator: