Item Cap

Axe.killer

New Member
Reaction score
24
Hello, is it possible for a hero to be allowed to carrry only 1 of a certain type of item at one time.
 
P

Pyros

Guest
You'd have to trigger it. Bear with me I don't have we with me atm, so I'm guessing what the commands are.

A unit picks up an item
Item equal to "your item"
Order triggering unit to drop last picked up item
Display message "you cannot use this item.

You could also make each item you want into one of the item sections in WE, like permanent, charged, they are mainly just sorters, and do not actually affect the item. Like you could do this.

"Super Amazing Wow Sword" is of the item type "Permanent"

SO this would be my guessed trigger

A unit picks up an item
Item type is equal to "Permanent"
Order triggering unit to drop last picked up item

Now that would be how to prevent the hero from picking up a certain type of item. I guess to stop them from having two would be...

A unit picks up an item
Item type of "picked up item" is equal to permanent
Hero possesses an item of type permanent (does this even exist, or is it worded right?)
Order triggering unit to drop last picked up item
 

AceHart

Your Friendly Neighborhood Admin
Reaction score
1,495
The Free Trigger Code sub-forum features several item restriction triggers, including a demo map...


Code:
ItemOnce
    Events
        Unit - A unit Acquires an item
    Conditions
        Or - Any (Conditions) are true
            Conditions
                (Item-type of (Item being manipulated)) Equal to Cheese
                (Item-type of (Item being manipulated)) Equal to Blood Key
                (Item-type of (Item being manipulated)) Equal to Gem Fragment
    Actions
        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 (Hero manipulating item) in slot (Integer A))) Equal to (Item-type of (Item being manipulated))
                        (Item carried by (Hero manipulating item) in slot (Integer A)) Not equal to (Item being manipulated)
                    Then - Actions
                        Hero - Drop the item from slot (Integer A) of (Hero manipulating item)
                        Quest - Display to (Player group((Owner of (Hero manipulating item)))) the Warning message: Sorry!
                    Else - Actions

Any item in the conditions can only be carried once.
Add or remove as needed.
 
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