• 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!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

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

Status
Not open for further replies.
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?
 
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.
 
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:
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

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.
Back
Top