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

Rather strange shop issue.

Level 4
Joined
Feb 5, 2020
Messages
51
In one of my maps I have a building that sells items but it also has an ability. The issue I'm having is that allies can not only purchase items from this building but also activate the ability without unit sharing toggled on. Is there a way to prevent allies from using the ability or is it hardcoded into the shop mechanic?
 
Level 4
Joined
Feb 5, 2020
Messages
51
I think you can use "Player - Disable Ability" for them so that it doesn't show up at all in the command card
This wouldn't work as any player can potentially have a copy of this building. I could however remove the ability from the object data and apply it through triggers on construction but that seems like an unnecessarily complex solution for a rather small problem. I might consider this however if I can't think of a more elegant solution.
 

Uncle

Warcraft Moderator
Level 73
Joined
Aug 10, 2018
Messages
7,877
This wouldn't work as any player can potentially have a copy of this building. I could however remove the ability from the object data and apply it through triggers on construction but that seems like an unnecessarily complex solution for a rather small problem. I might consider this however if I can't think of a more elegant solution.
A possible solution:
If the ability is "Instant" you can use an Item as the ability and set it's resource costs to 0. Then have a hidden copy of your Ability on the building which gets activated in response to the item being purchased - but only if the item buyer owns the shop. (Or just trigger the effects yourself). Then remove the purchased item from the game. You could even remove the item from the shop's stock and unhide the ability so it appears like you activated an ability. Once the ability finishes cooldown you can hide it again and add the item back to the shop starting the process over again.
 
Top