Cannot carry more than one (Item)

1346610

New Member
Reaction score
6
As in title i said,how do i make a hero to cannot carry more than one item?

ei: Gloves of Haste cant buy more than 1.
 

Ryushi

"I will stand, or I will fall. I will not sit."
Reaction score
59
So you want heroes to only be able to hold one copy of each item? Use something like this:
Trigger:
  • Trigger
    • Events
      • Unit - A unit Acquires an item
    • Conditions
    • Actions
      • Set Integer = 0
      • For each (Integer A) from 1 to 6, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Item-type of (Item carried by (Triggering unit) in slot (Integer A))) Equal to (Item-type of (Item being manipulated))
            • Then - Actions
              • Set Integer = (Integer + 1)
            • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Integer Greater than or equal to 2
        • Then - Actions
          • Hero - Drop (Item being manipulated) from (Triggering unit)
        • Else - Actions
 

1346610

New Member
Reaction score
6
So you want heroes to only be able to hold one copy of each item? Use something like this:
Trigger:
  • Trigger
    • Events
      • Unit - A unit Acquires an item
    • Conditions
    • Actions
      • Set Integer = 0
      • For each (Integer A) from 1 to 6, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Item-type of (Item carried by (Triggering unit) in slot (Integer A))) Equal to (Item-type of (Item being manipulated))
            • Then - Actions
              • Set Integer = (Integer + 1)
            • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Integer Greater than or equal to 2
        • Then - Actions
          • Hero - Drop (Item being manipulated) from (Triggering unit)
        • Else - Actions

No,sorry,i meant only with one item. :( sry again
 

Ryushi

"I will stand, or I will fall. I will not sit."
Reaction score
59
Well that's much easier to do. Just modify the Inventory (Hero) Ability to only have 1 item-slot.
 

1346610

New Member
Reaction score
6
Well that's much easier to do. Just modify the Inventory (Hero) Ability to only have 1 item-slot.

o_O i made the example of the gloves haste than u cannot carry more than one,it doesnt matter with inventory slot...
 

Smitty

Member
Reaction score
20
You need to explain. Ryushi gave you a method to check items, and you said you meant something else, so...? :s
 

1346610

New Member
Reaction score
6
You need to explain. Ryushi gave you a method to check items, and you said you meant something else, so...? :s

What can i say man?You cant understand ... the word "Cannot carry more than one" should tell you something,that a hero cant buy 2 items of same item ffs.
 

Smitty

Member
Reaction score
20
Yes, and Ryushi answered that question, so why did you say 'no I meant only with one item'? Just trying to understand...
 

1346610

New Member
Reaction score
6
Yes, and Ryushi answered that question, so why did you say 'no I meant only with one item'? Just trying to understand...

Coz 2 items of same item are not meant to be all the items of the map o_O,but only one.
 

Smitty

Member
Reaction score
20
Coz 2 items of same item are not meant to be all the items of the map o_O,but only one.

I really don't understand this. If you're trying to say it only has to work for one item, just add a condition to check the item is of that type.
 
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