• 🏆 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!

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