• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

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