• 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.

Shop Selection

Status
Not open for further replies.
Level 3
Joined
Apr 18, 2012
Messages
47
I based the building off of Voodoo Lounge and removed the ability called "Shop Sharing". Now if I place the edited Voodoo Lounge ("Non-sharing Voodoo Lounge") and the default Voodoo Lounge side by side owned by an allied player, I am only able to buy from the default one.

So yeah, remove the Shop Sharing ability.
 
Level 14
Joined
Jul 25, 2011
Messages
1,065
I based the building off of Voodoo Lounge and removed the ability called "Shop Sharing". Now if I place the edited Voodoo Lounge ("Non-sharing Voodoo Lounge") and the default Voodoo Lounge side by side owned by an allied player, I am only able to buy from the default one.

So yeah, remove the Shop Sharing ability.

I'm going to try that now.

EDIT: It didn't work for me. The owner or allies can't buy items.
 
Level 3
Joined
Apr 18, 2012
Messages
47
It worked for me. I am able to buy from both of my Voodoo Lounges (the non-sharing one and the default one) and I can buy only from the default Lounge of the AI allied player.
 

Attachments

  • ShopSharing.w3x
    16 KB · Views: 31
Level 14
Joined
Jul 25, 2011
Messages
1,065
Goddamit, you're right, sorry. I was tired.

I tried to use this trigger. But it doesn't work. If you set the items to "items sold" the shop will drop the items. I tried to move the items by this trigger. But it doesn't work. Any ideas?
  • IB
    • Events
      • Unit - A unit Sells an item (from shop)
    • Conditions
    • Actions
      • Item - Set the custom value of (Sold Item) to (Player number of (Owner of (Triggering unit)))
      • Hero - Give (Sold Item) to Gladiator[(Custom value of (Sold Item))]
 
Level 3
Joined
Apr 18, 2012
Messages
47
I've tried making the player deselect the shop immediately if it isn't his. Unfortunately, it doesn't deselect fast enough and you can still buy.

I've tried removing the item from the inventory of the player if he bought from a shop that isn't his own, but I found no way to refund the cost since there's no function to retrieve item cost. There only way I see to do the refund is to set the Custom Item Value to the gold cost of the item. I've also heard you can use the HP of item or number of charges to store gold cost when refunding.

  • No Sharing Shops
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • (Owner of (Selling unit)) Not equal to (Owner of (Hero manipulating item))
    • Actions
      • Hero - Drop (Item being manipulated) from (Hero manipulating item)
      • Item - Remove (Last dropped item)
      • Player - Add (Custom value of (Item being manipulated)) to Player 1 (Red) Current gold
      • Game - Display to (Player group((Owner of (Hero manipulating item)))) for 30.00 seconds the text: You may only buy from your own shops.
 
Level 14
Joined
Jul 25, 2011
Messages
1,065
I've tried making the player deselect the shop immediately if it isn't his. Unfortunately, it doesn't deselect fast enough and you can still buy.

I've tried removing the item from the inventory of the player if he bought from a shop that isn't his own, but I found no way to refund the cost since there's no function to retrieve item cost. There only way I see to do the refund is to set the Custom Item Value to the gold cost of the item. I've also heard you can use the HP of item or number of charges to store gold cost when refunding.

  • No Sharing Shops
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • (Owner of (Selling unit)) Not equal to (Owner of (Hero manipulating item))
    • Actions
      • Hero - Drop (Item being manipulated) from (Hero manipulating item)
      • Item - Remove (Last dropped item)
      • Player - Add (Custom value of (Item being manipulated)) to Player 1 (Red) Current gold
      • Game - Display to (Player group((Owner of (Hero manipulating item)))) for 30.00 seconds the text: You may only buy from your own shops.


Thank you very much!!! I think this will work. Credits to you in my map if it works.

EDIT: It worked!!! Thank you. Credits to you in my map.
 
Last edited:
Status
Not open for further replies.
Top