Lord_Kakashi
The Wabbits are attacking
- Reaction score
- 27
In advance, thank you for reading this.
The issue at hand is that I want to run the spawn in a loop where it has a 0.4 delay between every spawn on each lane. However I want the spawns to occour simultaniously on each lane.
To do this, I tried to make a loop containing a loop which had a wait inside it. However the wait inside the secondary loop affects the primary loop, so now the lanes spawn 1 at a time..
Edit: just for some clarification, since it doesnt appear entirely logical from the loop..
Region numbers 30 through 37 contains the spawning regions.
SpawnNumber is simply the amount of spawned creeps for each player.. 1 to x which might be different from another player 1 to y ect.. (hence the array)
ThisRound is just the unit variable for the unit that was chosen from the spawn table.
The only problem is that the spawns don't run simultaniously. Everything appears at the right location in the correct numbers. Just one lane at a time.
I'd much prefer if it was possible to make this in one trigger instead of making a spawn trigger for each and every player.
-----------------------------------------------------------------------------------------------------------------------------------------
Image
As it is now, 25 units will first spawn at lane A, then the loop will continue on to spawning 25 units at lane B, ect..
What I would like it to do is to spawn 25 units at lane A, while simultaniously (at the same time) spawning 25 units in lane B.
The wait is needed because I do not want the units to spawn in a big chunck, but one at a time. Although at the same time in every lane.
The issue at hand is that I want to run the spawn in a loop where it has a 0.4 delay between every spawn on each lane. However I want the spawns to occour simultaniously on each lane.
To do this, I tried to make a loop containing a loop which had a wait inside it. However the wait inside the secondary loop affects the primary loop, so now the lanes spawn 1 at a time..
Code:
Spawn
Events
Conditions
Actions
For each (Integer A) from 1 to 8, do (Actions)
Loop - Actions
Set Point[(100 + (Integer A))] = (Center of Regions[(29 + (Integer A))])
For each (Integer B) from 1 to SpawnNumber[(Integer A)], do (Actions)
Loop - Actions
Unit - Create 1 ThisRound for Player 12 (Brown) at Point[(100 + (Integer A))] facing Default building facing degrees
Wait 0.40 seconds
Custom script: call RemoveLocation(udg_Point[( 100 + GetForLoopIndexA() )])
Edit: just for some clarification, since it doesnt appear entirely logical from the loop..
Region numbers 30 through 37 contains the spawning regions.
SpawnNumber is simply the amount of spawned creeps for each player.. 1 to x which might be different from another player 1 to y ect.. (hence the array)
ThisRound is just the unit variable for the unit that was chosen from the spawn table.
The only problem is that the spawns don't run simultaniously. Everything appears at the right location in the correct numbers. Just one lane at a time.
I'd much prefer if it was possible to make this in one trigger instead of making a spawn trigger for each and every player.
-----------------------------------------------------------------------------------------------------------------------------------------
Image
As it is now, 25 units will first spawn at lane A, then the loop will continue on to spawning 25 units at lane B, ect..
What I would like it to do is to spawn 25 units at lane A, while simultaniously (at the same time) spawning 25 units in lane B.
The wait is needed because I do not want the units to spawn in a big chunck, but one at a time. Although at the same time in every lane.