• 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 faction for Warcraft 3 and enter Hive's 19th Techtree Contest: Co-Op Commanders! Click here to enter!
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 21st Texturing Contest: Upgrade is now concluded, time to vote for your favourite set of icons! Click here to vote!

Hotkeys lost after AddUnitToStock

Status
Not open for further replies.
Level 11
Joined
Mar 6, 2008
Messages
898
Hey, I wanted to create a shop where I can dynamically add and remove units or change their quantity.
So far it worked very well, however, there is one huge problem with this approach which I couldn't easily solve.

If I add a unit via AddUnitToStock native its hotkey does not work and a player has to manually click on the icon the actually purchase the unit. This is really bad for what I am trying to do. I guess this is a Blizzard bug since adding those units in the object editor works fine, even for partial subsets of units in the shop.

Does anybody know a decent work around?
A work around involving mass copies of object editor entities is not something I am after - for example I could create an ability with the exact hotkey per unit and add it hidden inside a spellbook to the shop and later catch the ability casts. I have not checked if this actually works but I really am not interested in such hacky approaches to solve this simple problem.

If it is unsolvable for now I will simply go back to the static approach.
 
Status
Not open for further replies.
Top