Limited hero item slots

Leo

New Member
Reaction score
14
How do you go about limiting a hero's item slots to just 1...is there an option for this somehow.

I know how i could do it using triggers and a dummy space filler item but is there an easier way? I don't do much stuff with heros normally, so my apologies if there is a just an option i overlooked somewhere to limit this.
 
Reaction score
107
i believe you can simply modify the ability "inventory (hero)" but im not sure, if not that, then you can try the unit ability "back pack" or something like that.

i dont have WE open right now so no guarantees, sorry if i didnt help :(
 
D

Doomsday

Guest
Object Editor > Items > Units > Inventory (Hero)
Change the maximum slots to 1.
 

WuHT

New Member
Reaction score
6
OF course if you only want CERTAIN heros to have limited spots, you can give them filler items that they can't drop/sell/use.
 

Leo

New Member
Reaction score
14
oh yea, and I forgot to mention I prefer all my maps to be roc compatible heh
 
M

Mythic Fr0st

Guest
hmm

RoC wow, :p the first thing it says to me when I start making triggers is

"Requires expansion" lol, can you edit abilities in RoC o_O, if so try editing the "Backpack" inventory ability...
 
W

Wind Dragon

Guest
(EDIT:) You can edit triggers in RoC can't you?? I seem to remember making basic "create units" triggers when I only had Reign of Chaos. Alright well my below comment is assuming that triggers can be done in RoC. If not well then that's just too bad.

Alright easy one. Sweet this is my first contribution to the forums:

First off you need to create an initial trigger which will set the scene for your one-slot inventory. This trigger is quite simple:

Code:
Item Manipulation
    Events
        Unit - A unit Acquires an item
    Conditions
    Actions
        Set Your_Hero = (Hero manipulating item)
        Set Your_Item = (Item being manipulated)
        Trigger - Run One Inventory Slot <gen> (checking conditions)

What this does is essentially makes it possible for this to work with ALL items. No matter what item your hero tries to pick up, he/she will only be able to hold one thing at a time.

The next trigger you need will determine if your character is already holding anything in his/her inventory. It's quite complicated logic-wise but it works.

Code:
One Inventory Slot
    Events
    Conditions
        ((Triggering unit) is A Hero) Equal to True
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Item carried by Your_Hero in slot 1) Not equal to Your_Item
            Then - Actions
                Hero - Drop Your_Item from Your_Hero
            Else - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Item carried by Your_Hero in slot 2) Equal to No item
                    Then - Actions
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                (Item carried by Your_Hero in slot 3) Equal to No item
                            Then - Actions
                                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                    If - Conditions
                                        (Item carried by Your_Hero in slot 4) Equal to No item
                                    Then - Actions
                                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                            If - Conditions
                                                (Item carried by Your_Hero in slot 5) Equal to No item
                                            Then - Actions
                                                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                                    If - Conditions
                                                        (Item carried by Your_Hero in slot 6) Equal to No item
                                                    Then - Actions
                                                        Skip remaining actions
                                                    Else - Actions
                                                        Hero - Drop Your_Item from Your_Hero
                                            Else - Actions
                                                Hero - Drop Your_Item from Your_Hero
                                    Else - Actions
                                        Hero - Drop Your_Item from Your_Hero
                            Else - Actions
                                Hero - Drop Your_Item from Your_Hero
                    Else - Actions
                        Hero - Drop Your_Item from Your_Hero

I tested this trigger and it works beautifully. The only downside is that it can be used to "move" items across a map. This would take a long time though and I'm guessing this trigger will be exactly what you're looking for.

This trigger has been tested and is leak-free. This trigger should work with Reign of Chaos. Enjoy!
 

garet10

Active Member
Reaction score
9
Leo said:
How do you go about limiting a hero's item slots to just 1...is there an option for this somehow.

I know how i could do it using triggers and a dummy space filler item but is there an easier way? I don't do much stuff with heros normally, so my apologies if there is a just an option i overlooked somewhere to limit this.

find the ablitiy Hero inventory and change slots to 1 :cool:
 

Leo

New Member
Reaction score
14
of course you can do triggers in roc lol just no ability editing without using SLKs, which is fine with me since my maps are normally more strategic type maps, and heros arent really an important element. I do have TFT myself, however, i just prefer to keep my maps roc comptatible, since there are still alot of people of people who have only roc and some of my maps have quite a large fanbase there

Thanks the for the trigger suggestion windwalk, that looks like it may serve my purposes, though I cant test it at the moment im not at home.

My problem with tft is that there are ton of maps, but they are so big, and stuffed with extra models they take forever to dload and dont spread...as a result it takes forever to filll a game of anything on bnet. plus the fact that like 80% of tft bnet games are dota is lame.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top