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

For Each Integer A, Do Action ??? (wtf is this?)

Status
Not open for further replies.
Level 4
Joined
Nov 22, 2004
Messages
62
can someone explain this action to me? they said that i repeat actions based of variables.. wht tha hell does that mean?
:?
thanks
 
Level 11
Joined
Aug 15, 2004
Messages
710
Raydrik said:
can someone explain this action to me? they said that i repeat actions based of variables.. wht tha hell does that mean?
:?
thanks

okay here's a more detailed approach, this usually used for array variables or when you have to do the same thing over again.

lets say you want to create 5 footman (yes i know this can be done with one action)

for each integer from 1-5 do actions

-creat 1 footman at ------

or lets say you have five different unit type variables, and want to use them

for each interger from 1-5 do actions

-create 1 variable unit type (for loop interger A)

for loop interger A is the number, that the loop is on, so if it's done it once, and it's on the second the number is 2. Open up a good non-JASS spell or map, and you should see this it is rather common
 
Status
Not open for further replies.
Top