I cannot get the "Requirements" field in an item to prevent it from being equipped.
The values on the item show up in red (like "Use" requirements do when you can't use an ability), but the item can still be equipped.
All that I want is an item that requires the hero be a certain level (5, 10, etc.)
I even tried manually checking the requirements using triggers, but the result is not pretty, and poorly hacked together.
Has anyone managed to get an item to not equip under certain conditions using the default inventory system? Even using triggers, or some other form of sorcery short of a complete inventory system re-design.
I am having the same issue you are having. It seems like I have tried everything, but it still doesn't work. I am trying to make it so that certain heros can only buy an item, and only certain heros can equip an item, so far I have had absoultely no luck at all.
Don't have a solution for you but I would not be surprised if that field were unimplemented as a lot of stuff relating to items and inventory is not implemented.
So I've come to understand.
Well, I'm wondering if maybe there's a non-data editor solution, or a solution to be found elsewhere in the DE?
I wonder if it's possible to leave the item "equippable", but ineffective?
I'll try playing with requirements on the equipped behaviors and see what I can come up with...those seem to work.
Also, for reference, I have this trigger that's supposed to work a little magic. I was originally thinking I could move the item into the "Carry" container rather than the "Equip" container, but item inventory indexing seems to be so thoroughly broken as to make that impossible. The trigger would also be leagues more effective if I could somehow get the requirements into the trigger, rather than manually re-writing the requirements for each item into said trigger. But, enough prattle. Trigger follows:
EventsUnit-AnyUnitMovesAnyItemUnit-AnyUnitPicksUpAnyItemUnit-AnyUnitBuysAnyItemLocalVariablesunitarmortype=""<String>intargar=0<Integer>Conditions(InventoryContainerof(Triggeringinventoryitem))==1ActionsGeneral-Switch(Actions)dependingon(Unittypeof(Triggeringinventoryitem))CasesGeneral-If(Armor-WarPig)ActionsGeneral-If(Conditions)thendo(Actions)elsedo(Actions)If(Experiencelevelof(Triggeringunit))<5ThenVariable-Setintargar=(NumberofItemsCarriedfor(Triggeringunit))UI-Display"Player is carrying this many items..."for(Allplayers)toSubtitleareaUI-Display(Text(intargar))for(Allplayers)toSubtitleareaUnit-Remove(Triggeringinventoryitem)fromthegameUnit-Create1(Unittypeof(Triggeringinventoryitem))forplayer0at(Positionof(Triggeringunit))
The remove and create lines were originally this line:
Unit - Move inventory item (Triggering inventory item) to slot intargar in container 1
I tried container 0, 1, 2. I honestly haven't figured out which it's supposed to be. It decided to work, if I made it slot 1 in container 1, but then I had a grenade equipped in my armor slot, which unfortunately does not ensue hilarity, as one would hope.
Bump. Now in full game it's working? My requirement looks like this:
CountBehavior(Agility,CompleteOnlyAtUnit) >= 5
But unit still can pick and equip item.
If not maybe is here way to make weapon impossible to use? Or check if unit equipping item(not picking) via trigger? I have trouble with this ;/
My workaround to check equipping was to have two inventories, one for "equipped" items (Inventory 1), and one for carrying items (Inventory 2).
Then I just ran this:
(Inventory Container of (Triggering inventory item)) == 1
But honestly, I think one of the alternate inventory systems should be able to handle this. At this point, it's easier to try to tweak one of them or write your own than try to work with what Blizzard left us.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
I cannot get the "Requirements" field in an item to prevent it from being equipped. The values on the item show up in red (like "Use" requirements do when you can't use an ability), but the item can still be equipped. All that I want is an item that requires the hero be a certain level (5, 10, etc.)
I even tried manually checking the requirements using triggers, but the result is not pretty, and poorly hacked together.
Has anyone managed to get an item to not equip under certain conditions using the default inventory system? Even using triggers, or some other form of sorcery short of a complete inventory system re-design.
Can anyone help? Please? Thank you for your time.
I am having the same issue you are having. It seems like I have tried everything, but it still doesn't work. I am trying to make it so that certain heros can only buy an item, and only certain heros can equip an item, so far I have had absoultely no luck at all.
Don't have a solution for you but I would not be surprised if that field were unimplemented as a lot of stuff relating to items and inventory is not implemented.
@RileyStarcraft: Go
So I've come to understand.
Well, I'm wondering if maybe there's a non-data editor solution, or a solution to be found elsewhere in the DE?
I wonder if it's possible to leave the item "equippable", but ineffective?
I'll try playing with requirements on the equipped behaviors and see what I can come up with...those seem to work.
Also, for reference, I have this trigger that's supposed to work a little magic. I was originally thinking I could move the item into the "Carry" container rather than the "Equip" container, but item inventory indexing seems to be so thoroughly broken as to make that impossible. The trigger would also be leagues more effective if I could somehow get the requirements into the trigger, rather than manually re-writing the requirements for each item into said trigger. But, enough prattle. Trigger follows:
The remove and create lines were originally this line:
Unit - Move inventory item (Triggering inventory item) to slot intargar in container 1
I tried container 0, 1, 2. I honestly haven't figured out which it's supposed to be. It decided to work, if I made it slot 1 in container 1, but then I had a grenade equipped in my armor slot, which unfortunately does not ensue hilarity, as one would hope.
I bump again.
Bump. Now in full game it's working? My requirement looks like this:
CountBehavior(Agility,CompleteOnlyAtUnit) >= 5
But unit still can pick and equip item.
If not maybe is here way to make weapon impossible to use? Or check if unit equipping item(not picking) via trigger? I have trouble with this ;/
My workaround to check equipping was to have two inventories, one for "equipped" items (Inventory 1), and one for carrying items (Inventory 2).
Then I just ran this:
(Inventory Container of (Triggering inventory item)) == 1
But honestly, I think one of the alternate inventory systems should be able to handle this. At this point, it's easier to try to tweak one of them or write your own than try to work with what Blizzard left us.