• 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.

Item Carry = 1

Status
Not open for further replies.
Level 13
Joined
Sep 14, 2008
Messages
1,408
Trigger

  • Stack Items
    • Event
      • Unit - A unit accquires an item
    • Condition
      • Or - Any (Conditions) are true
        • Condition
          • (Item-type of (Item being manipulated)) equal to ItemYouWant
    • Event
      • 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'-Bedingungen
              • (Item carried by (Triggering unit) in slot (Integer A)) Gleich (Item being manipulated)
            • 'THEN'-Aktionen
              • Set SlotNumber = (Integer A)
            • 'ELSE'-Aktionen
      • For each (Integer B) from 1 to 6, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • 'IF'-Bedingungen
              • And - All (Conditions) are true
                • Conditions
                  • (Integer B) not equal to SlotNumber
                  • (Item-type of (Item carried by (Triggering unit) in slot SlotNumber)) equal to (Item-type of (Item carried by (Triggering unit) in slot (Integer B)))
            • 'THEN'-Actions
              • Item - Set charges remaining in (Item carried by (Triggering unit) in slot (Integer B)) to ((Charges remaining in (Item carried by (Triggering unit) in slot (Integer B))) + (Charges remaining in (Item being manipulated)))
              • Item - Remove (Item being manipulated)
            • 'ELSE'-Actions
This trigger does not only remove the item. I adds the charges of the picked item to the item already carried.
 
Level 12
Joined
Mar 16, 2006
Messages
992
By replacing the hero inventory ability with custom inventory ability that can only hold 1 item?
 
Status
Not open for further replies.
Top