If my hero's inventory is full, how do i prevent an itemshop from selling items to it? Coz right now, even though my inventory's full, the unit can still keep buying items from shops, though the items won't appear anywhere. Any ideas?
How bout making a variable called "Inv Count" or something, making it +1 everytime you pickup an item, then prevent the shops from doing anything using some sort of trigger if the "Inv Count" is as high as your max inventory space
There's a function called Count Inventory Items to count the number of items.
I find only one flaw with your suggestion...How exactly do you propose i prevent the shop from selling the item via triggers? =P
I've obviously already thought of this idea...however, there are main problems with it. The shop will have already "sold" the item by the time the trigger detects the sale. Plus, If i were to just refund the sold item, i would have to make individual triggers for EACH item type i have available. ><
Well the thing is that it's a Multiplayer map. So there's basically one inventory for each player in the game. I can't very well pause the itemshop just because ONE player has a full inventory. lol
Well the thing is that it's a Multiplayer map. So there's basically one inventory for each player in the game. I can't very well pause the itemshop just because ONE player has a full inventory. lol
I'm going to assume you have the same setup that I had. 1 Building, selling to an entire team. Before you get too much further around this, you may want to look at this problem I had, you may have the same problem.
To make an itemshop you need TWO ability types on the itemshop:
1) Interact - to allow the shop to share control with other players.
2) Train - Because an item is considered as a "unit", you use this ability to create it.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
If my hero's inventory is full, how do i prevent an itemshop from selling items to it? Coz right now, even though my inventory's full, the unit can still keep buying items from shops, though the items won't appear anywhere. Any ideas?
How bout making a variable called "Inv Count" or something, making it +1 everytime you pickup an item, then prevent the shops from doing anything using some sort of trigger if the "Inv Count" is as high as your max inventory space
There's a function called Count Inventory Items to count the number of items.
I find only one flaw with your suggestion...How exactly do you propose i prevent the shop from selling the item via triggers? =P
I've obviously already thought of this idea...however, there are main problems with it. The shop will have already "sold" the item by the time the trigger detects the sale. Plus, If i were to just refund the sold item, i would have to make individual triggers for EACH item type i have available. ><
That is true, you could perhaps pause the shop once the last inventory slot is filled, and unpause once it's cleared again ?
Err that only works if i had ONE unit with an inventory. lol
True that... And from your reaction I take that is not the case... hm... How many units are we talking about?
Well the thing is that it's a Multiplayer map. So there's basically one inventory for each player in the game. I can't very well pause the itemshop just because ONE player has a full inventory. lol
Hm yea that's an issue, Im'a do some some thinkin and come to you if i tihnk of something
I'm going to assume you have the same setup that I had. 1 Building, selling to an entire team. Before you get too much further around this, you may want to look at this problem I had, you may have the same problem.
And if you don't, what you did would be nice to know >.> lol
http://forums.sc2mapster.com/development/map-development/3517-game-breaking-upgrade-problem-qq/
Nah different problem altogether. But i had a look at your problem and i just thought of a solution for it. Try it and see if it works. Good luck. =D
Hi there,
Normally the items appear on the ground next to the shop. How did you make the shop? I've searched for a solution but couldnt find one.
Greetz Khazr
Nah, the shop sells directly to me.
To make an itemshop you need TWO ability types on the itemshop: 1) Interact - to allow the shop to share control with other players. 2) Train - Because an item is considered as a "unit", you use this ability to create it.