Another issue now is that i have 6 regions and every region should spawn 20 units (Of the same units)
Is it possible to create a variable for the regions or something and make this trigger:
Spawn
Events
Timer - Timer expires
Local Variables
Conditions
Actions
Unit - Create 20 Zergling for player 3 at (Center of Spawn 1) facing (Position of HeadQuarter [55.50, 14.50]) (No Options)
Unit - Create 20 Zergling for player 3 at (Center of Spawn 2) facing (Position of HeadQuarter [55.50, 14.50]) (No Options)
Unit - Create 20 Zergling for player 3 at (Center of Spawn 3) facing (Position of HeadQuarter [55.50, 14.50]) (No Options)
Unit - Create 20 Zergling for player 3 at (Center of Spawn 4) facing (Position of HeadQuarter [55.50, 14.50]) (No Options)
Unit - Create 20 Zergling for player 3 at (Center of Spawn 5) facing (Position of HeadQuarter [55.50, 14.50]) (No Options)
Unit - Create 20 Zergling for player 3 at (Center of Spawn 6) facing (Position of HeadQuarter [55.50, 14.50]) (No Options)
Into a one liner: What im searching for is for instence: Create 20 Zergl. For player 3 at (Region Variable 1-6) <- But should be 20 each.. Possible?
For Each Player in Player Group Do
- Create 20 Zergling for (Picker Player) at Center of RegionVariable[Picked Player]
Of course you will have to have a trigger that puts each Spawn location to the correct Variable array. E.g, Spawn 1 would be RegionVariable[1] to spawn for player 1.
Quite simple. Create global variable of type Region (lets say SpawnRegion), and make it an array of size 5. Then at map initialization, or any other trigger that runs before spawns, put your regions in the array like this:
Also, are you spawning multiple waves this way? If you do, you could use a global variable to count number of wave, and another variable array that would hold unit types of incoming waves.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
Hi,
Another issue now is that i have 6 regions and every region should spawn 20 units (Of the same units)
Is it possible to create a variable for the regions or something and make this trigger:
Spawn
Events
Timer - Timer expires
Local Variables
Conditions
Actions
Unit - Create 20 Zergling for player 3 at (Center of Spawn 1) facing (Position of HeadQuarter [55.50, 14.50]) (No Options)
Unit - Create 20 Zergling for player 3 at (Center of Spawn 2) facing (Position of HeadQuarter [55.50, 14.50]) (No Options)
Unit - Create 20 Zergling for player 3 at (Center of Spawn 3) facing (Position of HeadQuarter [55.50, 14.50]) (No Options)
Unit - Create 20 Zergling for player 3 at (Center of Spawn 4) facing (Position of HeadQuarter [55.50, 14.50]) (No Options)
Unit - Create 20 Zergling for player 3 at (Center of Spawn 5) facing (Position of HeadQuarter [55.50, 14.50]) (No Options)
Unit - Create 20 Zergling for player 3 at (Center of Spawn 6) facing (Position of HeadQuarter [55.50, 14.50]) (No Options)
Into a one liner: What im searching for is for instence: Create 20 Zergl. For player 3 at (Region Variable 1-6) <- But should be 20 each.. Possible?
Set up a trigger like this...
For Each Player in Player Group Do - Create 20 Zergling for (Picker Player) at Center of RegionVariable[Picked Player]
Of course you will have to have a trigger that puts each Spawn location to the correct Variable array. E.g, Spawn 1 would be RegionVariable[1] to spawn for player 1.
Quite simple. Create global variable of type Region (lets say SpawnRegion), and make it an array of size 5. Then at map initialization, or any other trigger that runs before spawns, put your regions in the array like this:
Then when calling function use while loop or for loop thru 0-5 and referr to SpawnRegion[int] (i'll use while):
Also, are you spawning multiple waves this way? If you do, you could use a global variable to count number of wave, and another variable array that would hold unit types of incoming waves.