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

Need Help with a Spell Cap Trigger

Status
Not open for further replies.
Level 3
Joined
Jun 7, 2007
Messages
30
I have a map where the heroes can buy their spells but the way I have it set up in the triggers is that when they buy an item the items is removed from their inventory and an spell is added to their abilities.
The problem is I only want them to be able to buy 4 spells. I can't figure out how to stop them from buying more than 4 spells. Can some one please help?
 
Level 13
Joined
Nov 22, 2006
Messages
1,260
Well, every hero has an "inventory" ability, you can change it's item slots to 4. If you don't like that way, well, you can trigger it, the trigger should fire when the unit aquires an item, conditions if the number of items in the unit is more than 4, and the action would be to remove that item and give back the money?
 
Level 3
Joined
Jun 7, 2007
Messages
30
The item is removed from their inventory as soon as they get it. You dont even get to see the item. I just more or less use it as a dummy.
 
Level 13
Joined
Nov 22, 2006
Messages
1,260
I think you don't have to redo all the spells, just create a trigger which would detect the 5th item in the inventory (the event will detect it even if it's removed instantly) and remove the corresponding ability. Sorry for such unclear suggestions, I'll write the code, but now I must hurry to school.
 
Status
Not open for further replies.
Top