How do I make it so that you will not be able to buy items from a shop if your inventory is full? I also have several item class types so if I just have it check for a full inventory, the purchased items will still be dropped on the floor if the slots are taken for that item class but there are other slots available. I am trying to prevent players from being able to purchase items if certain slots are full.
because of this and several other issues i am using dialogs for shops (even having reciepes). all i need is an unit array and all data is saved on the unit (button, description, costs, needed reciepe)
Disable the shop for that unit by using a validator that checks for 6 stacks of your dummy behavior.
An example of how to disable the shop for that unit would be to make a second behavior that has the "radar" flag. This behavior has the "has 6 stacks of the dummy behavior" validator, and is present on every hero by default. Then simply make your shop's interact autocast filter exclude "radar".
Thank you. I am hoping that what you mentioned can be one solution to this. However, given the complexity of this workaround, I can't help but wonder if there is an easier way to do the same thing. I am on the verge of giving up finding that "easier" method and I might go with what you suggested.
Is there a way to remove the items placed on the ground if you buy stuff while your inventory is full?
there is. any item that is beared on a unit has the flag "hidden". give the item a buff that lasts 2 seconds on creation validating if it is hidden or not and remove it then.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
How do I make it so that you will not be able to buy items from a shop if your inventory is full? I also have several item class types so if I just have it check for a full inventory, the purchased items will still be dropped on the floor if the slots are taken for that item class but there are other slots available. I am trying to prevent players from being able to purchase items if certain slots are full.
@Stormahawk: Go
because of this and several other issues i am using dialogs for shops (even having reciepes). all i need is an unit array and all data is saved on the unit (button, description, costs, needed reciepe)
Stick a dummy behavior onto each item.
Disable the shop for that unit by using a validator that checks for 6 stacks of your dummy behavior.
An example of how to disable the shop for that unit would be to make a second behavior that has the "radar" flag. This behavior has the "has 6 stacks of the dummy behavior" validator, and is present on every hero by default. Then simply make your shop's interact autocast filter exclude "radar".
Thank you. I am hoping that what you mentioned can be one solution to this. However, given the complexity of this workaround, I can't help but wonder if there is an easier way to do the same thing. I am on the verge of giving up finding that "easier" method and I might go with what you suggested.
Is there a way to remove the items placed on the ground if you buy stuff while your inventory is full?
@Stormahawk: Go
there is. any item that is beared on a unit has the flag "hidden". give the item a buff that lasts 2 seconds on creation validating if it is hidden or not and remove it then.