• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Simple question

Status
Not open for further replies.
Level 9
Joined
Feb 20, 2014
Messages
409
Hi!
In my RPG all swords are lvl1,all armor lvl2 ect...
I did it because I want my hero to wear only 1 armor, sword ect at a time.
But how to make a trigger checking if my hero is already carrying (anyitem) lvl1 so he drops the picked item lvl1 on the floor?
 
Level 5
Joined
Jan 19, 2018
Messages
126
  • Weapon Limit
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Item-type of (Item being manipulated)) Equal to Brass Sword
          • (Item-type of (Item being manipulated)) Equal to Iron Sword
          • (Item-type of (Item being manipulated)) Equal to Mithril Sword
          • (Item-type of (Item being manipulated)) Equal to Steel Axe
          • (Item-type of (Item being manipulated)) Equal to Steel Sword
    • Actions
      • Set weaponCounter = 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
              • Or - Any (Conditions) are true
                • Conditions
                  • Brass Sword Equal to (Item-type of (Item carried by (Hero manipulating item) in slot (Integer A)))
                  • Iron Sword Equal to (Item-type of (Item carried by (Hero manipulating item) in slot (Integer A)))
                  • Mithril Sword Equal to (Item-type of (Item carried by (Hero manipulating item) in slot (Integer A)))
                  • Steel Axe Equal to (Item-type of (Item carried by (Hero manipulating item) in slot (Integer A)))
                  • Steel Sword Equal to (Item-type of (Item carried by (Hero manipulating item) in slot (Integer A)))
            • Then - Actions
              • Set weaponCounter = (weaponCounter + 1)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • weaponCounter Greater than 1
                • Then - Actions
                  • Unit - Order (Hero manipulating item) to drop (Item being manipulated) at (Position of (Item being manipulated))
                  • Game - Display to (All players) for 3.00 seconds the text: You can only carry ...
                • Else - Actions
            • Else - Actions
Here's a basic one I just made for someone else, you can use it too and expand upon it, just replace the items in the trigger with your items.

This way you don't have to keep weapons level 1 and what not.
Hope this helps.
 
Status
Not open for further replies.
Top