Item restrictions

johnnymra

New Member
Reaction score
14
I know this kind of topic has been posted before but all those i've read didn't help me :(...
In my map there are 2 teams - say A and B.
I want to make it so that there would be a type of items for A and a type for B.
If a hero from B picks an item of the type he should be able to carry, he will keep it. But if he picks up an item of another type he should drop it.

I'm using the trigger:
Code:
Item disabling
    Events
        Unit - A unit Acquires an item
    Conditions
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                ((Owner of (Hero manipulating item)) is in Shifters) Equal to True
            Then - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        Or - Any (Conditions) are true
                            Conditions
                                (Item-class of (Item being manipulated)) Equal to Permanent
                                (Item-class of (Item being manipulated)) Equal to Charged
                                (Item-class of (Item being manipulated)) Equal to Powerup
                                (Item-class of (Item being manipulated)) Equal to Artifact
                                (Item-class of (Item being manipulated)) Equal to Purchasable
                                (Item-class of (Item being manipulated)) Equal to Campaign
                    Then - Actions
                    Else - Actions
            Else - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Item-class of (Item being manipulated)) Equal to Miscellaneous
                    Then - Actions
                        Hero - Drop (Item being manipulated) from (Triggering unit)
                    Else - Actions
The problem is... those in team B can still wear items that they shouldn't. I used miscellaneous type for the items they should wear, and all the other types would be those they mush drop... but they don't drop them :(.
For team A i didn't test if they drop the miscellaneous type items yet... but i want to fix for team B first.
 

HydraRancher

Truth begins in lies
Reaction score
197
Run a debug text message. So after you put Hero - Drop, put Game: Display text message to (All Players): TEST.

Something like that, to see if it actually runs. Also, put one after the "Else" actions to check if they are actually in Team B.
 

johnnymra

New Member
Reaction score
14
yep i tested how you told me... but o my god... now i say the problem :))... i feel so stupid :( ... i just didn't put the action to drop the item if it was another class than miscellaneous. :))
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top