I have a shop set up with the pawn ability and items cannot be sold to it. Whenever an item is dragged and dropped on the shop I get the error "This unit requires an inventory".
THE ITEMS HAVE THE PAWNABLE FLAG
I tried downloading Onetwo's hero tutorial from 2010 and tried to sell it in his example. It did the same thing. Is this a bug with 3.0? How can I get around it easily? I don't want to have to trigger shop transactions.
EDIT: Also how would I go about creating a 'select patron' ability like the shops in Warcraft 3 had when multiple units were next to a shop
Create a dummy inventory with only 1 slot and assign it to the shop. That allows you to pass the "unit requires inventory" check, and will work if you are removing the item from game when you give to shop.
I'd also recommend setting an empty button face with appropriate text to the dummy slot.
I tried doing this, but it doesn't apply the refund % set on the item. At that point it's not even being pawned, it's just being given to the unit and then destroyed.
I think it works for me but I can't test it right now...
Actually I would try with 0 slots on the dummy inventory ability. Just an idea: Maybe your shop belongs to the same player as the hero pawning and it just gives the item. Try a neutral player for the shop if it isn't already.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
I have a shop set up with the pawn ability and items cannot be sold to it. Whenever an item is dragged and dropped on the shop I get the error "This unit requires an inventory".
THE ITEMS HAVE THE PAWNABLE FLAG
I tried downloading Onetwo's hero tutorial from 2010 and tried to sell it in his example. It did the same thing. Is this a bug with 3.0? How can I get around it easily? I don't want to have to trigger shop transactions.
EDIT: Also how would I go about creating a 'select patron' ability like the shops in Warcraft 3 had when multiple units were next to a shop
@w00bz: Go
Create a dummy inventory with only 1 slot and assign it to the shop. That allows you to pass the "unit requires inventory" check, and will work if you are removing the item from game when you give to shop.
I'd also recommend setting an empty button face with appropriate text to the dummy slot.
YES, it is a change with Patch 3.0
@Rohime: Go
I tried doing this, but it doesn't apply the refund % set on the item. At that point it's not even being pawned, it's just being given to the unit and then destroyed.
@w00bz: Go
Ummm ... i do the refund in triggers, so i havent actually tried the way you are ... sorry.
@Rohime: Go
can you post how you do your refunds?
I think it works for me but I can't test it right now...
Actually I would try with 0 slots on the dummy inventory ability. Just an idea: Maybe your shop belongs to the same player as the hero pawning and it just gives the item. Try a neutral player for the shop if it isn't already.