• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Limiting Items on a Hero

Status
Not open for further replies.
It's quite simple, actually. You don't have to bother with triggers. Just open your Abilities tab in Object editor, and find under Special Abilities, Inventory(Hero), and change Item Capacity to whichever number you want (note that it won't work above 6) and if you want it unique for a hero, then make a copy of it, and then add the ability to your hero's ability list, but remove the old one.

Or....

If you meant on limiting a SINGLE item, just make a trigger that when a specific type of item is picked up to check the inventory of the hero if it contains that item, and then do an If/Then/Else with multiple actions, and if it exists, then make the hero drop it, and then add whatever you want after that, and if not (else), then Do Nothing. In other words...

Events:
(Unit) acquires an item
Conditions:
Item-type of Item being Manipulated equal to (your item)
Actions:
If/Then/Else
If:
Hero Manipulating Item has an item of type (your item)
Then:
Drop Item being manipulated from Hero Manipulating Item
Else:
Do Nothing
 
Status
Not open for further replies.
Top