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

Trigger from 1 to 8

Status
Not open for further replies.
Level 7
Joined
May 18, 2010
Messages
264
  • Stats AD
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • ((Ability being cast) Equal to (==) Feral Spirit ) or ((Ability being cast) Equal to (==) Animate Dead)
      • ((Triggering unit) is A Hero) Equal to (==) True
    • Actions
      • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
        • Then - Actions
          • Set Stats_Track_6Int[1] = (Stats_Track_6Int[1] + 1)
          • Game - Display to (All players) the text: (String(Stats_Track_6Int[1]))
        • Else - Actions
Now : Stats_Track_6Int[1]
From Set Stats_Track_6Int[1] = (Stats_Track_6Int[1] + 1)
the [1] I want it to be From 1 to 8
or i most do
set Stats_Track_6Int[1] = (Stats_Track_6Int[1] + 1)
set Stats_Track_6Int[2] = (Stats_Track_6Int[2] + 1)
or is there easyer way???
 
Did you mean repeating actions 8 times?

Do it like this. Create integer variable - its set by default to 0.

Now use action: For each Integer variable from 1 to 8 do Actions (its at the begining of the action list just under For each Integer A(...)):
In Integer variable you enter your created variable, lets call it your_Integer.
<here are your action>
Now, to refer to the array, just use (within this loop):

  • Game - Display to (All players) the text: (String(Stats_Track_6Int[your_Integer]))
 
Level 7
Joined
May 18, 2010
Messages
264
Did you mean repeating actions 8 times?

Do it like this. Create integer variable - its set by default to 0.

Now use action: For each Integer variable from 1 to 8 do Actions (its at the begining of the action list just under For each Integer A(...)):
In Integer variable you enter your created variable, lets call it your_Integer.
<here are your action>
Now, to refer to the array, just use (within this loop):

  • Game - Display to (All players) the text: (String(Stats_Track_6Int[your_Integer]))


Not repeat 8 times but from 1(player) to 8(player) im tracking stats
now (this trigger isent what im using justa mix of random stuff)
But it helpt Thanks

  • Stats AD
    • Events
    • Conditions
    • Actions
      • Do Multiple ActionsFor each (Integer Stats_Track_6Int[0]) from 1 to 8, do (Actions)
        • Loop - Actions
          • Set Stats_Track_6Int[1] = (Stats_Track_6Int[1] + 1)
Stats_Track_7Int should not be ARRAY?
i kinda dont get it ^^
 
Last edited by a moderator:
So you could use it anyways just refer to player (from 1-8) by using given Integer as array like Player[your_Integer] within this loop i shown before.

Loop goes through 8 numbers and you need 8 referentions (1 for each player from number 1 to 8), its still should be usefull here.

EDIT: It should looks more like this:
  • Stats AD
    • Events
    • Conditions
    • Actions
      • Do Multiple ActionsFor each (Integer Stats_Track_6Int[0]) from 1 to 8, do (Actions)
        • Loop - Actions
          • Set Stats_Track_6Int[Stats_Track_6Int[0]] = (Stats_Track_6Int[Stats_Track_6Int[0]] + 1)
Thats why i said use other integer as variable here bacause now your array is kinda messy.
 
Level 7
Joined
May 18, 2010
Messages
264
  • Stats AD
    • Events
    • Conditions
    • Actions
      • Do Multiple ActionsFor each (Integer Stats_Track_6Int[0]) from 1 to 8, do (Actions)
        • Loop - Actions
          • Set Stats_Track_6Int[Stats_Track_6Int[0]] = (Stats_Track_6Int[Stats_Track_6Int[0]] + 1)
sry im sleepy
Shoul i use it like this above.
Or i most change something ellse so it does for all 8 players the Stats_Track_6Int to go +1 for [1-8]players???
 
Status
Not open for further replies.
Top