- 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.
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.