• 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 selling items to enemies

Status
Not open for further replies.
Level 12
Joined
Apr 16, 2010
Messages
584
My problem is that when the enemy unit comes to the shop he can buy that item, although shop doesn't belong to him or ally.
Shop has these abilities: Sell Items, Shop Purchase Item, Shop Sharing, Select Hero.
I want edit abilities so only allies of that player, to whom shop belongs, can only buy items. I tried adding to Targets Allowed in every ability, Allied, but didn't help, any ideas?
If there's no way doing this i'll make it triggered.
Oh another example, same thing is in DotA, where you can buy items at enemie's base.
 
Level 4
Joined
Sep 23, 2010
Messages
88
If you want P1 to buy items from P12 owned shop and P2 can't buy, than add this:
  • Player - Make Player 12 (Brown) treat Player 1 (Red) as an Ally
  • Player - Make Player 1 (Red) treat Player 12 (Brown) as an Ally
  • Player - Make Player 12 (Brown) treat Player 2 (Blue) as an Enemy
  • Player - Make Player 2 (Blue) treat Player 12 (Brown) as an Ally
 
Level 12
Joined
Apr 16, 2010
Messages
584
I appreciate your help guys, but that's not what i'm looking for, but thanks anyway. I guess i'll make like i wanted from the beginning: i have 3 clans each clan got different items, each item from clan i'll move to different category and then with triggers i'll make checking; if buying unit is in that clan where item is then all fine else remove item. But with this i would have a problem...
So maybe you guys know in what ability (Sell Items, Shop Purchase Item, Shop Sharing, Select Hero) what targets should i paste to make it easier.
Allied doesn't help!
 
Level 4
Joined
Sep 23, 2010
Messages
88
I'm not good at english srry if I didn't understand, but are you saying that you want to make other clans can't buy different clans' items from the same shop?
 
Level 3
Joined
Jan 8, 2011
Messages
70
Have you tried a trigger so that if someone who is not allied with the building owner clicks on it, it deselects?

Those are pretty easy to do, you just need a trigger that checks every half a second or something. I don't know the exact trigger but i'm pretty sure it would solve your problem.
 
Level 12
Joined
Apr 16, 2010
Messages
584
the map I give can buy items in enemy bases...
yes i know, but i wanted not buy at enemies base items, that's why i used watermelon_1234's replay it worked perfectly.
Have you tried a trigger so that if someone who is not allied with the building owner clicks on it, it deselects?

Those are pretty easy to do, you just need a trigger that checks every half a second or something. I don't know the exact trigger but i'm pretty sure it would solve your problem.
there's a better way. I typed it in post [self="http://www.hiveworkshop.com/forums/1810923-post6.html"]#6[/self].
Anyway, problem Solved!
 
Status
Not open for further replies.
Top