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

Question of Efficiency

Status
Not open for further replies.
Level 3
Joined
Nov 24, 2011
Messages
31
What is the most efficient way to trigger a item recipe on a region? Below is one way that I think that I can trigger a item recipe on a region. However, it is long and tedious. Do you guys know any other way? BTW, don't worry about that "Do Nothing" function. I will remove it.

  • Harm
    • Events
      • Unit - A unit enters lightning <gen>
    • Conditions
      • ((Triggering unit) is A Hero) Equal to True
    • 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 carried by (Triggering unit) in slot 1)) Equal to Golden Skull key
              • (Item-type of (Item carried by (Triggering unit) in slot 2)) Equal to Golden Skull key
              • (Item-type of (Item carried by (Triggering unit) in slot 3)) Equal to Golden Skull key
              • (Item-type of (Item carried by (Triggering unit) in slot 4)) Equal to Golden Skull key
              • (Item-type of (Item carried by (Triggering unit) in slot 5)) Equal to Golden Skull key
              • (Item-type of (Item carried by (Triggering unit) in slot 6)) Equal to Golden Skull key
          • Or - Any (Conditions) are true
            • Conditions
              • (Item-type of (Item carried by (Triggering unit) in slot 1)) Equal to Silver Skull key
              • (Item-type of (Item carried by (Triggering unit) in slot 2)) Equal to Silver Skull key
              • (Item-type of (Item carried by (Triggering unit) in slot 3)) Equal to Silver Skull key
              • (Item-type of (Item carried by (Triggering unit) in slot 4)) Equal to Silver Skull key
              • (Item-type of (Item carried by (Triggering unit) in slot 5)) Equal to Silver Skull key
              • (Item-type of (Item carried by (Triggering unit) in slot 6)) Equal to Silver Skull key
          • Or - Any (Conditions) are true
            • Conditions
              • (Item-type of (Item carried by (Triggering unit) in slot 1)) Equal to Maind key
              • (Item-type of (Item carried by (Triggering unit) in slot 2)) Equal to Maind key
              • (Item-type of (Item carried by (Triggering unit) in slot 3)) Equal to Maind key
              • (Item-type of (Item carried by (Triggering unit) in slot 4)) Equal to Maind key
              • (Item-type of (Item carried by (Triggering unit) in slot 5)) Equal to Maind key
              • (Item-type of (Item carried by (Triggering unit) in slot 6)) Equal to Maind key
        • Then - Actions
          • Item - Remove (Item carried by (Triggering unit) of type Golden Skull key)
          • Item - Remove (Item carried by (Triggering unit) of type Silver Skull key)
          • Item - Remove (Item carried by (Triggering unit) of type Maind key)
          • Item - Create Golden Skull key at (Center of (Playable map area))
          • Hero - Give (Last created item) to (Triggering unit)
        • Else - Actions
          • Do nothing
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
  • Untitled Trigger 002
    • Events
      • Unit - A unit enters (Current camera bounds)
    • Conditions
      • ((Triggering unit) is A Hero) Equal to True
      • ((Triggering unit) has an item of type Golden Skull key) Equal to True
      • ((Triggering unit) has an item of type Silver Skull key) Equal to True
      • ((Triggering unit) has an item of type Maind key) Equal to True
    • Actions
      • Item - Remove (Item carried by (Triggering unit) of type Golden Skull key)
      • Item - Remove (Item carried by (Triggering unit) of type Silver Skull key)
      • Item - Remove (Item carried by (Triggering unit) of type Maind key)
      • Hero - Create Golden Skull key and give it to (Triggering unit)
Boolean Comparison - Hero - Hero Has Item Of Type (Conditions)
Hero - Create Item For Hero (Actions)
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
I just don't understand why that you check an item name "Golden Skull key" and remove it, and then, create a same item for that unit.

I thought this is more like a recipe, but it's not ?

Item A
Item B
Item C

Remove Item A, B, C

Create Item A

Does not makes sense >.>"

Why not just remove Item B and C if you want to keep Item A at the end ?
 
Status
Not open for further replies.
Top