Item Combining

AaronPwner

Member
Reaction score
0
I've looked at the item recipe tutorials, but I still can't seem to make this work. It doesnt remove or create any items..

Trigger:
  • Trigger1
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • (Item-type of (Item being manipulated)) Equal to Mooncrystal
    • Actions
      • For each (Integer A) from 1 to 6, do (If ((Item-type of (Item carried by (Hero manipulating item) in slot (Integer A))) Equal to Mooncrystal) then do (Set MagicDoorKey = (MagicDoorKey + 1)) else do (Do nothing))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • MagicDoorKey Equal to 2
        • Then - Actions
          • Hero - Drop (Item carried by (Hero manipulating item) of type Mooncrystal) from (Hero manipulating item)
          • Item - Remove (Last dropped item)
          • Hero - Drop (Item carried by (Hero manipulating item) of type Mooncrystal) from (Hero manipulating item)
          • Item - Remove (Last dropped item)
          • Hero - Create Partial Key of the Three Moons and give it to (Hero manipulating item)
          • Special Effect - Create a special effect attached to the origin of (Hero manipulating item) using Abilities\Spells\Items\AIim\AIimTarget.mdl
        • Else - Actions
          • Do nothing


PS: I'm obviously missing a trigger to minus the "MagicDoorKey" variable if the player drops the item, but I want to get this to work first.
 

Archideas

Active Member
Reaction score
32
I recently added an item combinating "system" to my map as well. It's actually very simple but works very well. Here's how it looks, feel free to copy it.

Trigger:
  • Stack Items
    • Events
      • Unit - A unit Acquires an item
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Or - Any (Conditions) are true
            • Conditions
              • (Item-type of (Item being manipulated)) Equal to Scroll of Time
              • (Item-type of (Item being manipulated)) Equal to Scroll of Time
              • (Item-type of (Item being manipulated)) Equal to Slumber Sand
              • (Item-type of (Item being manipulated)) Equal to Lifeblood Potion
              • (Item-type of (Item being manipulated)) Equal to Lifeblood Potion
              • (Item-type of (Item being manipulated)) Equal to Lifeblood Potion
              • (Item-type of (Item being manipulated)) Equal to Spiritual Potion
              • (Item-type of (Item being manipulated)) Equal to Spiritual Potion
              • (Item-type of (Item being manipulated)) Equal to Spiritual Potion
              • (Item-type of (Item being manipulated)) Equal to Potion of Unending Fury
              • (Item-type of (Item being manipulated)) Equal to Potion of Refreshment
        • Then - 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
                  • (Item-type of (Item carried by (Hero manipulating item) in slot (Integer A))) Equal to (Item-type of (Item being manipulated))
                  • (Item carried by (Hero manipulating item) in slot (Integer A)) Not equal to (Item being manipulated)
                • Then - Actions
                  • Item - Set charges remaining in (Item carried by (Hero manipulating item) in slot (Integer A)) to ((Charges remaining in (Item carried by (Hero manipulating item) in slot (Integer A))) + (Charges remaining in (Item being manipulated)))
                  • Item - Remove (Item being manipulated)
                • Else - Actions
        • Else - Actions


*EDIT*

This basically checks if you've got i.e 1 Lifeblood Potion and buy/pick up say, 4 more. It'll then combine 1+4 and make it a stack of 5.
 
General chit-chat
Help Users

      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