• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

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.
 
Level 11
Joined
Mar 6, 2008
Messages
898
You are free to bump this since I am still interested in a solution.
For my own project I stopped this experiment and concluded that there is currently no fix for it.
But in WarCraft III you basically can nearly always find a hack to do it - wearing hand gloves of course. ;)
 
Status
Not open for further replies.
Top