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

Intergers

Status
Not open for further replies.
Level 9
Joined
Aug 1, 2008
Messages
453
Is there anyway to make this trigger so i don't have to check [1] [2] [3] [4] [5] [6] [7] [8]? Like so i just put Item[Somthing] and it checks all the arrays?
  • Untitled Trigger 001
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Item-type of (Item being manipulated)) Equal to Item[1]
          • (Item-type of (Item being manipulated)) Equal to Item[2]
          • (Item-type of (Item being manipulated)) Equal to Item[3]
          • (Item-type of (Item being manipulated)) Equal to Item[4]
          • (Item-type of (Item being manipulated)) Equal to Item[5]
          • (Item-type of (Item being manipulated)) Equal to Item[6]
          • (Item-type of (Item being manipulated)) Equal to Item[7]
          • (Item-type of (Item being manipulated)) Equal to Item[8]
    • Actions
 
Level 17
Joined
Jun 17, 2007
Messages
1,433
  • Actions
    • For each (Integer A) from 1 to 8, do (Actions)
      • Loop - Actions
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • (Item-type of (Item being manipulated)) Equal to Item[(Integer A)]
          • Then - Actions
            • -------- Your Actions --------
          • Else - Actions
Would work. It's ideal if you have an extremely large array, but it's pretty slow in GUI.
 
Status
Not open for further replies.
Top