Would be better to make individual points instead of regions. There isn't a function to fill up a region with units or anything. You can make points and then have random offsets in random directions to randomly spread out units if you want.
The best way to make a whole lot of units would be to use loops. There are several types. The best would probably be a "for each integer" loop. You can make loops within loops if you want to say, make 9 different units at 9 different points each.
Set the unit types you want to create within a Unit Type variable array and use the array within the loops.
What exactly are you trying to do? Are you trying to create 160 units in a region that's not large enough to hold them? Do you want them to move somewhere, attack, patrol, or just sit there? When do you want them to spawn?
Also, can you upload a screenshot of your current trigger?
LocalVariablesregions=NoRegion<Region[8]>
i = 0 <Integer>
Actions
Variable - Set regions[0] = region1
Variable - Set regions[1] = region2
Variable - Set regions[2] = region3
Variable - Set regions[3] = region4
Variable - Set regions[4] = region5
Variable - Set regions[5] = region6
Variable - Set regions[6] = region7
Variable - Set regions[7] = region8
Variable - Set regions[8] = region9
General - For each integer i from 0 to 8 with increment 1, do (Actions)
Actions
General - Repeat (Actions) (1429 / 9) times
Actions
Unit - Create 1 Marine for player 1 at (Random point in regions[i]) using default facing (No Options)
General - Wait 0.0 Game Time seconds
Yeah I found using regions wont work. Because I hate how blizzard set up the regions, It picks a point, and places the unit close to that point, but it doesnt make sure there isnt a unit in that point causing alot of units to be spawned outside the region.
Im going to make the trees turn to stumps when harvested, and then give the stumps a behavior to re-grow the trees.
the behavior will be applied via trigger by button vote.
only scenario when unit is spawned outside is when there is not enough space, otherwise you can do while (unit is in region == false) move unit to random point in region. But this may lag even more if your out of luck.
What exactly are you trying to do? Are you trying to create 160 units in a region that's not large enough to hold them? Do you want them to move somewhere, attack, patrol, or just sit there? When do you want them to spawn?
Also, can you upload a screenshot of your current trigger?
I deleted the entire trigger and decided to go another route, a cooler one, When a tree gets chopped down it leaves a stump unit, and At the end of the game imma have a button that applys a morph behavior to the stumps that turns them back into trees.
this is for mini chop farms, it was just to reset everything by vote at the end of the game. So imma kill all units, and then morph the stumps back into trees.
Okay i made a trigger to kill all units on map
now i want to create around 1429 units at exact locations, How can I do this easily
I can make 9 regions to cover all locations, without their being a single 1x1 grid square empty in the region
so how would I go about creating these units.?
@Taintedwisp: Go
Would be better to make individual points instead of regions. There isn't a function to fill up a region with units or anything. You can make points and then have random offsets in random directions to randomly spread out units if you want.
The best way to make a whole lot of units would be to use loops. There are several types. The best would probably be a "for each integer" loop. You can make loops within loops if you want to say, make 9 different units at 9 different points each.
Set the unit types you want to create within a Unit Type variable array and use the array within the loops.
@Monictor: Go
but theres 1429 units... LOL
@Taintedwisp: Go
So create around 160 units in each of the 9 regions?
@shalnath: Go
Yeah i tried that but the problem is, i use creat unit at random location in region, and they keep spawning outside the region.
@Taintedwisp: Go
What exactly are you trying to do? Are you trying to create 160 units in a region that's not large enough to hold them? Do you want them to move somewhere, attack, patrol, or just sit there? When do you want them to spawn?
Also, can you upload a screenshot of your current trigger?
@Taintedwisp: Go
You can try without wait 0 but it may lag out
@Nerfpl: Go
Yeah I found using regions wont work. Because I hate how blizzard set up the regions, It picks a point, and places the unit close to that point, but it doesnt make sure there isnt a unit in that point causing alot of units to be spawned outside the region.
Im going to make the trees turn to stumps when harvested, and then give the stumps a behavior to re-grow the trees.
the behavior will be applied via trigger by button vote.
only scenario when unit is spawned outside is when there is not enough space, otherwise you can do while (unit is in region == false) move unit to random point in region. But this may lag even more if your out of luck.
^This
-What are you trying to achieve?
I deleted the entire trigger and decided to go another route, a cooler one, When a tree gets chopped down it leaves a stump unit, and At the end of the game imma have a button that applys a morph behavior to the stumps that turns them back into trees.
this is for mini chop farms, it was just to reset everything by vote at the end of the game. So imma kill all units, and then morph the stumps back into trees.