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!
Is there such a function or something similar to get the items sold by a shop? I would like to do something similar to what one would do by getting an item from an inventory slot.
If you're thinking of getting a list of sold items, I believe there's no easy way of doing that. If my hunch is correct, it would be a unit integer array field, and array fields are not even fully implemented for abilities which is currently their only presence in the editor. However, I could see it being possible in some warped way where you:
Create a dummy unit.
Optionally create a dummy shop as well in case you have stocks in there or something and don't want to fiddle with them.
Force the dummy to buy every item, then sell them back after storing what item-type it was, one by one.
This would give you an item-type array of sold items. It sounds very rough, and it is. I think it would work though, but I'm not going to dive into it at 1 in the morning. Maybe tomorrow if I remember it, and it keeps my attention for long enough.
Your method will require knowing the item type ids, so I would be better off just setting an array for the items and shop since I will have to do anyway with your method. I would like to avoid that because it is tedious with a lot of shops and items.
A better method would be storing object data in some way (hashtable) and retrieving it later via one function.
One used to be able to use a tool known as ODE (short for object data extractor) to do this.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.