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

one item per hero

Status
Not open for further replies.
Level 4
Joined
Jul 25, 2007
Messages
71
i also wanted to make a trigger where you can only pick up one kind of sword. But you will be buying them from shops, so gold refund will need to be included. I'm using attachments, so it just would be bad if they had 2 swords. know what im saying?

I just want it so they can only carry ONE of a certan kind of item.
 
Level 17
Joined
Jun 17, 2007
Messages
1,433
Make all swords the same item classification (purchasable, for example). When a hero picks up an item, check the item's classification and whether the hero already has an item of that type. If he does, add X gold to the owner of the hero's gold. X is equal to the price of the item.
 
Level 4
Joined
Jul 25, 2007
Messages
71
Nice.. that worked. But that only works with one player. I have 5 players in my game. Only one of them is allowed to have an item. I've experimented with different variables but cant get it to work. anything else in mind?
 
Status
Not open for further replies.
Top