• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

RPG Items - main hand slots etc.

Status
Not open for further replies.
Level 11
Joined
Jun 26, 2014
Messages
497
I want to make RPG items that have different slots like main hand, off hand, chest, head ect. ...

For my main hand I have set all items to be level 4. So if any items are main hand items their level is ''4''.
Why is the following trigger not working? How do I fix it?

  • Mainhand 4
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • (Item level of (Item carried by (Triggering unit) in slot 1)) Equal to 4
      • (Item level of (Item carried by (Triggering unit) in slot 2)) Equal to 4
      • (Item level of (Item carried by (Triggering unit) in slot 3)) Equal to 4
      • (Item level of (Item carried by (Triggering unit) in slot 4)) Equal to 4
      • (Item level of (Item carried by (Triggering unit) in slot 5)) Equal to 4
      • (Item level of (Item carried by (Triggering unit) in slot 6)) Equal to 4
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Item level of (Item being manipulated)) Equal to 4
        • Then - Actions
          • Hero - Drop (Item being manipulated) from (Triggering unit)
          • Player Group - Add (Owner of (Triggering unit)) to PlayerGroup[1]
          • Game - Display to PlayerGroup[1] for 10.00 seconds the text: You can only carry ...
          • Player Group - Remove (Owner of (Triggering unit)) from PlayerGroup[1]
        • Else - Actions
 
Level 11
Joined
Jun 26, 2014
Messages
497
I figured it out, if anyone needs the solution here it is:
  • Mainhand 4
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • (Item level of (Item being manipulated)) Equal to 4
    • 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 level of (Item carried by (Triggering unit) in slot (Integer A))) Equal to 4
            • 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)
          • Player Group - Add (Owner of (Triggering unit)) to PlayerGroup[1]
          • Game - Display to PlayerGroup[1] for 10.00 seconds the text: You can only carry ...
          • Player Group - Remove (Owner of (Triggering unit)) from PlayerGroup[1]
        • Else - Actions
Sorry for double post will not do again!!!
 
Status
Not open for further replies.
Top