Once I found the functions I wanted, this was pretty straight forward.
It may seem as I'm mixing integer and real values / variables for no reason, but this was the easiest way to do what I wanted. If I change the variables to Integers, I can't add them to the offset. If I make the loop "for each real...", I can't convert to integer to avoid infinite loops in case the region isn't even. I could, of course, add a ton of convert integer to real and vice versa.. but this works, so meh.
It only works for square regions, so hopefully that's what you want. Adapting this for circular or combined regions would be a pain.
The wait 0.1 is only there to visualize how the trigger works.
Once I found the functions I wanted, this was pretty straight forward.
It may seem as I'm mixing integer and real values / variables for no reason, but this was the easiest way to do what I wanted. If I change the variables to Integers, I can't add them to the offset. If I make the loop "for each real...", I can't convert to integer to avoid infinite loops in case the region isn't even. I could, of course, add a ton of convert integer to real and vice versa.. but this works, so meh.
It only works for square regions, so hopefully that's what you want. Adapting this for circular or combined regions would be a pain.
The wait 0.1 is only there to visualize how the trigger works.
Spawn units Events Game - Map initialization Local Variables x = 0.0 <Real> y = 0.0 <Real> Conditions Actions General - For each integer y from 0 to (Integer((Height of Spawn 01))) with increment 1, do (Actions) Actions General - For each integer x from 0 to (Integer((Width of Spawn 01))) with increment 1, do (Actions) Actions Unit - Create 1 Marine for player 1 at ((Bottom-left of Spawn 01 bounds) offset by (x, y)) using default facing (No Options) General - Wait 0.1 Game Time seconds
is there anyway to move the units as a group staying in their positon of the region? i can make them take up no space at all theyll just be my movement units in the backround un noticed. im using it for a diablo style map btw
Hey guys I'm trying to make a trigger that takes the width and height of a region and then creates a unit at every point.
I'm able to get it to find points in the region but i cant get the units to spawn at every point throughout the region.
Once I found the functions I wanted, this was pretty straight forward.
It may seem as I'm mixing integer and real values / variables for no reason, but this was the easiest way to do what I wanted. If I change the variables to Integers, I can't add them to the offset. If I make the loop "for each real...", I can't convert to integer to avoid infinite loops in case the region isn't even. I could, of course, add a ton of convert integer to real and vice versa.. but this works, so meh.
It only works for square regions, so hopefully that's what you want. Adapting this for circular or combined regions would be a pain.
The wait 0.1 is only there to visualize how the trigger works.
thank you very much that fixed my problem. i was making it way to complicated =]
is there anyway to move the units as a group staying in their positon of the region? i can make them take up no space at all theyll just be my movement units in the backround un noticed. im using it for a diablo style map btw
@johney7289: Go
Posted my take on this in the original topic since it doesn't really fit here.