Hi guys,
I have some questions regarding this trigger ("system"). The system that I'm trying to create is basically a spawn system, which would spawn x number of x unit types for every player every 60 secs.
My question is: Can I somehow reduce the amount of lines, for example in "Spawn action" trigger, in "Human Player1" section, can I maybe merge 3 lines into a single one with the help of array that I have.
Currently each line of the three spawns x number of x unit types for player 1. Can I make it that one line spawns x number of x unit types for player 1 and so on for every other player.
This trigger is only made for 2 players instead for all, cause I'm asking for your advice and some tips regarding it.
Thank you in advance!
I have some questions regarding this trigger ("system"). The system that I'm trying to create is basically a spawn system, which would spawn x number of x unit types for every player every 60 secs.
My question is: Can I somehow reduce the amount of lines, for example in "Spawn action" trigger, in "Human Player1" section, can I maybe merge 3 lines into a single one with the help of array that I have.
Currently each line of the three spawns x number of x unit types for player 1. Can I make it that one line spawns x number of x unit types for player 1 and so on for every other player.
This trigger is only made for 2 players instead for all, cause I'm asking for your advice and some tips regarding it.
-
Spawn init
-
Events
- Time - Elapsed game time is 1.00 seconds
- Conditions
-
Actions
- Set int_var = 1
- -------- Humans (Player1) --------
- Set unit_type_var[1] = Footman
- Set unit_type_var2[1] = Archer
- Set unit_type_var3[1] = Knight
- Set unit_count_var[1] = 3
- Set unit_count_var2[1] = 2
- Set unit_count_var3[1] = 1
- -------- Orc (Player2) --------
- Set unit_type_var[2] = Grunt
- Set unit_type_var2[2] = Forest Troll
- Set unit_type_var3[2] = Orc Warchief
- Set unit_count_var[2] = 3
- Set unit_count_var2[2] = 2
- Set unit_count_var3[2] = 1
-
Events
-
Spawn action
-
Events
- Time - Every 60.00 seconds of game time
- Conditions
-
Actions
-
For each (Integer A) from 1 to int_var, do (Actions)
-
Loop - Actions
- -------- Human (Player1) --------
- Unit - Create unit_count_var[1] unit_type_var[1] for Player 1 (Red) at (Center of Human <gen>) facing Default building facing degrees
- Unit - Create unit_count_var2[1] unit_type_var2[1] for Player 1 (Red) at (Center of Human <gen>) facing Default building facing degrees
- Unit - Create unit_count_var3[1] unit_type_var3[1] for Player 1 (Red) at (Center of Human <gen>) facing Default building facing degrees
- -------- Orc (Player2) --------
- Unit - Create unit_count_var[2] unit_type_var[2] for Player 2 (Blue) at (Center of Human <gen>) facing Default building facing degrees
- Unit - Create unit_count_var2[2] unit_type_var2[2] for Player 2 (Blue) at (Center of Human <gen>) facing Default building facing degrees
- Unit - Create unit_count_var3[3] unit_type_var3[3] for Player 2 (Blue) at (Center of Human <gen>) facing Default building facing degrees
-
Loop - Actions
-
For each (Integer A) from 1 to int_var, do (Actions)
-
Events
Thank you in advance!