Weapon system help

wilze

Active Member
Reaction score
3
These triggers are to prevent a hero to pick up more than one weapon. All weps are permanent (classification).

But now i can't pick up any of the items without having an weps in inventory.

Code:
Weapon system SG
    Events
        Unit - A unit Acquires an item
    Conditions
        (Item-type of (Item being manipulated)) Equal to Benelli M4
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Item-class of (Item carried by (Hero manipulating item) in slot 1)) Not equal to Permanent
                (Item-class of (Item carried by (Hero manipulating item) in slot 2)) Not equal to Permanent
                (Item-class of (Item carried by (Hero manipulating item) in slot 3)) Not equal to Permanent
                (Item-class of (Item carried by (Hero manipulating item) in slot 4)) Not equal to Permanent
                (Item-class of (Item carried by (Hero manipulating item) in slot 5)) Not equal to Permanent
                (Item-class of (Item carried by (Hero manipulating item) in slot 6)) Not equal to Permanent
            Then - Actions
                Item - Move (Item being manipulated) to (Position of (Hero manipulating item))
            Else - Actions
                Unit - Set mana of (Hero manipulating item) to 8.00

Code:
Weapon system Assult
    Events
        Unit - A unit Acquires an item
    Conditions
        (Item-type of (Item being manipulated)) Equal to M16 Assault rifle
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Item-class of (Item carried by (Hero manipulating item) in slot 1)) Not equal to Permanent
                (Item-class of (Item carried by (Hero manipulating item) in slot 2)) Not equal to Permanent
                (Item-class of (Item carried by (Hero manipulating item) in slot 3)) Not equal to Permanent
                (Item-class of (Item carried by (Hero manipulating item) in slot 4)) Not equal to Permanent
                (Item-class of (Item carried by (Hero manipulating item) in slot 5)) Not equal to Permanent
                (Item-class of (Item carried by (Hero manipulating item) in slot 6)) Not equal to Permanent
            Then - Actions
                Item - Move (Item being manipulated) to (Position of (Hero manipulating item))
            Else - Actions
                Unit - Set mana of (Hero manipulating item) to 8.00

Code:
Weapon system HG
    Events
        Unit - A unit Acquires an item
    Conditions
        (Item-type of (Item being manipulated)) Equal to Glock 17
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Item-class of (Item carried by (Hero manipulating item) in slot 1)) Not equal to Permanent
                (Item-class of (Item carried by (Hero manipulating item) in slot 2)) Not equal to Permanent
                (Item-class of (Item carried by (Hero manipulating item) in slot 3)) Not equal to Permanent
                (Item-class of (Item carried by (Hero manipulating item) in slot 4)) Not equal to Permanent
                (Item-class of (Item carried by (Hero manipulating item) in slot 5)) Not equal to Permanent
                (Item-class of (Item carried by (Hero manipulating item) in slot 6)) Not equal to Permanent
            Then - Actions
                Item - Move (Item being manipulated) to (Position of (Hero manipulating item))
            Else - Actions
                Unit - Set mana of (Hero manipulating item) to 8.00

thanks for the help.
 

Tyrulan

Ultra Cool Member
Reaction score
37
Not sure what the logic is with your system here.. could you explain a little further?

Also don't use (CODE)(/CODE) tags. Use (WC3)(/WC3), using square brackets.
 

wilze

Active Member
Reaction score
3
Well it's not really a weapon system i mean. This just prevents the player to have more than one weapon.

There is one trigger for each wep, when the hero picks up one of these weapons it checks if the hero has a weapon of the clssification permanent in any slot.

As i said all the weps are permanent.
 

hasslarn

New Member
Reaction score
20
Didnt quite understand what you want.

do you want so you could only have one item per class?

well here is a trigger i found on hive that i use in my map.

How to use: Just change all weapons to permenant and remove the other triggers incase you dont want 1 limit on all items.

Trigger:
  • 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
            • And - All (Conditions) are true
              • Conditions
                • ((Hero manipulating item) has (Item carried by (Hero manipulating item) in slot (Integer A))) Equal to True
                • (Item carried by (Hero manipulating item) in slot (Integer A)) Not equal to (Item being manipulated)
                • (Item-class of (Item carried by (Hero manipulating item) in slot (Integer A))) Equal to (Item-class of (Item being manipulated))
          • Then - Actions
            • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • (Item-class of (Item being manipulated)) Equal to Permanent
              • Then - Actions
                • Game - Display to (Player group((Owner of (Hero manipulating item)))) the text: |cffff0000You alrea...
                • Hero - Drop (Item being manipulated) from (Hero manipulating item)
              • Else - Actions
 
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