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

In Any Slot?

Status
Not open for further replies.
Level 2
Joined
Jul 3, 2008
Messages
10
Triggering Question

Okay, so I have a trigger. Heres a section of it -

[Item carried by (Hero manipulating item) in slot 1.]

I can change the 1 to numbers 1-6, but I want it in ANY slot. 1, 2, 3, 4, 5, or 6. Is there any way to do this? Please help!
 
Level 16
Joined
May 1, 2008
Messages
1,605
Moin moin =)

Hmm actually it's hard to give an answer because I don't know your situation but for example you can use boolean conditions:


  • ((Hero manipulating item) has an item of type Tome of Experience) Equal to (==) True
Or you can use something like that:
  • Do Multiple ActionsFor each (Integer A) from 1 to 6, do (Actions)
    • Loop - Actions
      • Multiple FunctionsIf (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 (==) Tome of Experience
        • Then - Actions
        • Else - Actions
Greetings
~ The Bomb King > Dr. Boom
 
Level 8
Joined
Jun 26, 2010
Messages
530
If your triggers don't run when a unit manipulates an item it wouldn't be able to use "Hero Manipulating Item. A good example would be if you is trying to do something that don't uses an manipulating item. Like that:

  • Events
    • Unit - a unit dies
  • Conditions
    • Dying unit have darkness helm in it's inventory
  • Actions
    • Item - Drop Darkness helm
In that case there are no conditions to search for a item in all the inventory, and there's no loop in conditions so you should use theactions If-Then-Else Multiple Functions comibined with an integer loop in a way that the trigger check every slot

Example:

  • Events
    • Unit - a unit dies
  • Conditions
  • Actions
    • For each integer A from 1 to 6, do actions
      • loop
        • If - Then - Else
          • if
            • Item - Item carried by (dying unit) in slot (For loop Integer A) = Darkness Helm
          • then
            • Item - Drop item carried by (dying unit) in slot (For loop Integer A)
          • else
    • Item - Drop Darkness helm
That way you easily drop all the itens you want and you don't even need to set one condition for each slot under an "Conditions - Or - Multiple Functions"
 
Status
Not open for further replies.
Top