Warcraft III resources & community, 2003–2006 · archived

Unknown Action Trigger

5 posts
#1

Unknown Action Trigger

what does "for each {interger A}from # to #, do Actions" do?
#2
If u do for example: for each integer a from 1 - 10 do: create 1 footy at Rect is the same as:

Create 1 footy at rect
Create 1 footy at rect
Create 1 footy at rect
Create 1 footy at rect
Create 1 footy at rect
Create 1 footy at rect
Create 1 footy at rect
Create 1 footy at rect
Create 1 footy at rect
Create 1 footy at rect
#3

other actions

so then what does "A" from "interger A" mean?
#4
the A stands for at what number he is (im not englisch :P) So if he did 3 actions, the A is 3. So now u can use actions like create one special effect at (point with polar offset) 300 toward 360/10(integer a from 1 - 10)x integer A So thjen u get a circle of special effect from 300 range on the unit or object
#5
Ramzathe A stands for at what number he is (im not englisch :P) So if he did 3 actions, the A is 3. So now u can use actions like create one special effect at (point with polar offset) 300 toward 360/10(integer a from 1 - 10)x integer A So thjen u get a circle of special effect from 300 range on the unit or object


I'm afraid your explanation is uncorrect. (from what i understand of it)

For each integer A is used mostly for variables.
For instance, i create a variable, Var_player_num
I attach 8 players, each to the corresponding array number of that variable (for instance, player 1 = Var_player_num(1))
We do the same with startlocations, attach player 1's start location to variable: Var_playerstart_loc, and do this for each player.

Now, when i want to check for players, if they are ingame, then give them a unit at their startloc;

For each Integer A (1 to 8)
   If Var_player_num (Integer A)is playing (is equal to true)
      Then Unit - create (x) (unit) at (var_playerstart_loc (Integer A)


This way, i've got 8 triggers done in one, instead of creating the same lines all over again, i've done it all for 8 players in 2 lines.