• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Shops dropping items on the floor, can't use unit sells an item event.

Status
Not open for further replies.
Level 7
Joined
Mar 16, 2014
Messages
152
I have a shop that has shop sharing and shop purchase item on it. When the shop sells an item, it drops the item on the floor instead of giving it to the person I want it to be given to. I can't give the shop the select hero button (which fixes the problem), because this causes the shop to be able to sell to enemy players instead of just allied players.

I tried this:
Code:
Unbugged Shop Purchase
    Events
        Unit - A unit Sells an item (from shop)
    Conditions
    Actions
        Game - Display to (All players) the text: (Name of (Buying unit))
        Hero - Create (Item-type of (Sold Item)) and give it to (Buying unit)
        Item - Remove (Sold Item)

But the event never even registers. The game message there is just a debug message to confirm the trigger didn't register.

The shop is a Hero with no inventory, which I figured might also be the problem. If this is the problem, is there any way around it, or do I have to make the shop not be a Hero?
 
Level 13
Joined
Jul 15, 2007
Messages
763
Definitely an odd problem, I'd bet it occurs because the game doesn't/can't treat or recognize heroes as shops.

I briefly tried a few approaches including order strings but it seems like its impossible to detect via trigger the moment the item spawns and drops on the floor.
 
Level 12
Joined
Nov 3, 2013
Messages
989
The arcane vault and those kinds of building have another category "Items Made" besides "items sold" that units and heroes don't. Maybe this has something to do with it

Jupp, I just tested and the same thing happens (bought item being dropped on the ground) with the arcane vault if you give it items that are "sold" instead of "made"

Edit: the solution is quite simple, just give the unit both select hero AND shop purchasing ability, enemy units can't click and use abilities or buy any items etc. but allies can and the items don't drop to the ground.
 
Last edited:
Level 7
Joined
Mar 16, 2014
Messages
152
I have tried giving the shop select hero, shop sharing, and shop purchase item simultaneously. I have tried all possible combinations of the 3 abilities. It gives the item to the buying unit so long as I have select hero on it, but so long as select hero is on it enemies can use the shop.
 
Level 12
Joined
Nov 3, 2013
Messages
989
I have tried giving the shop select hero, shop sharing, and shop purchase item simultaneously. I have tried all possible combinations of the 3 abilities. It gives the item to the buying unit so long as I have select hero on it, but so long as select hero is on it enemies can use the shop.
Well at least it worked with "select hero, sell items, shop sharing" for me.

You can buy claws of attack from the blue (allied) footman but not from the teal (enemy) footman, at least I couldn't.
 

Attachments

  • hero shop sharing test.w3x
    16.7 KB · Views: 59
Level 7
Joined
Mar 16, 2014
Messages
152
After some more research, it's just an issue with my map. I'm going to chalk it up to the fact that I worked on it with World Editor Unlimited in the past long ago.

Only items before I started editing with the latest patches, and default items from default Warcraft 3 shops, function properly. Nothing else works. Heck, my map is in a weird enough state where I can't remove the items from those shops. Only those items in those specific shops will not drop to the floor and will properly trigger "unit sells an item" event, while everything else does drop to the floor and does not trigger it.
 
Status
Not open for further replies.
Top