Dear Map Makers,
I am trying to create spawn waves with random units in it (via template lists). Can somebody give a hint on how this would be done (if possible). Here is my current workflow, but it only spawns 1 Arcanist in the 1st wave, 2 Arcanists in the 2nd wave, 3 Arcanists in the 3rd wave, instead of spawning 1 sapper and 1 arcanist in the 1st wave, 1 Arcanist and 1 Arcane Templar in the 2nd wave, ...:
1) I setup an empty party which will later be used in the action "spawn party".
2) I create an empty template list in which the randomized units will be added via action "pick from list"
3) I create another template list, which holds all the possible units to spawn (via adding them to the empty template, that is used in the empty party later on)
4) I create a script that is looped each 6 seconds by a timer. First it clears the (empty) template list, since the script is looped and units in the list would otherwise stack.
Then it creates a random number between 0 and 2 which is stored in a number (this will be used in the next step).
5) Now it picks (via the random number) the position from my possible units to spawn from the arcanist list (0 - Arcane Templar / 1 - Arcanist / 2 - Sapper) and puts it into the empty template list. Then it randomizes the number again.
6) With the again shuffled number between 0 - 2 it saves another unit to the list. Finally this list is now added to the empty Party1, which will be spawned now.
7) Now after 6 seconds the timer fires the event again.
But as I said in the beginning, the template list seems not to be cleared correctly (1 wave spawns 1 unit, 2 wave spawns 2 units, ...) and also the units are not randomly picked and added to the list, but it's always the Arcanist which is spawned.
Please, if you have ideas / corrections on my method, or some hints on how to debug it properly, please leave a note. As always, thank you for your help and thoughts!
I am trying to create spawn waves with random units in it (via template lists). Can somebody give a hint on how this would be done (if possible). Here is my current workflow, but it only spawns 1 Arcanist in the 1st wave, 2 Arcanists in the 2nd wave, 3 Arcanists in the 3rd wave, instead of spawning 1 sapper and 1 arcanist in the 1st wave, 1 Arcanist and 1 Arcane Templar in the 2nd wave, ...:
1) I setup an empty party which will later be used in the action "spawn party".
2) I create an empty template list in which the randomized units will be added via action "pick from list"
3) I create another template list, which holds all the possible units to spawn (via adding them to the empty template, that is used in the empty party later on)
4) I create a script that is looped each 6 seconds by a timer. First it clears the (empty) template list, since the script is looped and units in the list would otherwise stack.
Then it creates a random number between 0 and 2 which is stored in a number (this will be used in the next step).
5) Now it picks (via the random number) the position from my possible units to spawn from the arcanist list (0 - Arcane Templar / 1 - Arcanist / 2 - Sapper) and puts it into the empty template list. Then it randomizes the number again.
6) With the again shuffled number between 0 - 2 it saves another unit to the list. Finally this list is now added to the empty Party1, which will be spawned now.
7) Now after 6 seconds the timer fires the event again.
But as I said in the beginning, the template list seems not to be cleared correctly (1 wave spawns 1 unit, 2 wave spawns 2 units, ...) and also the units are not randomly picked and added to the list, but it's always the Arcanist which is spawned.
Please, if you have ideas / corrections on my method, or some hints on how to debug it properly, please leave a note. As always, thank you for your help and thoughts!