Staredit Network

Staredit Network -> UMS Assistance -> Creating units in a line
Report, edit, etc...Posted by Drakiel on 2005-01-14 at 22:26:55
I'm trying to create units in a straight line. Say... Pylons.
I have a 10x2 location and I'm trying to have them create in a row from left to right. And remove from right to left.

Create at location, preserve
Only creates one pylon, then gives a placement error.

(I want to use this as an energy system. For triggers to read how many pylons aswell as the gamer to see a bar to guesstimate their energy on the minimap)

I know I can use a more complex method like:
"If pylon is at location 1, create at location 2"
"If pylon is at location 2, create at location 3"
"If energy is used remove pylon at location 6, 7, 8 ,9, 10"
(This won't exactly work, it's just a basic idea of what will be done, not to mention it wastes a BUTT load of triggers)


There's gotta be a simpler method.

What is the best way to do this?

ADDITION:
Oh yea, and this is limited space, a single 10x2 location in an enclosed area only 10x2 area. The unit "grid" (used for nesw directions in SC) won't work in this case.
Report, edit, etc...Posted by LegacyWeapon on 2005-01-14 at 23:07:01
Use the give action. I won't explain in detail because you're advanced.
Give X lurkers, center location on lurker hur, remove 1 pylon hur. Use smart triggers like
Bring 1 to here
Give X lurkers
Center location on lurker
remove pylon at location
You can do lots with this.

You can't do this any simpler.
Report, edit, etc...Posted by greenreaper on 2005-01-14 at 23:08:32
There is a simpler way, although it requires 3 locations. Basically just create an air unit at one location, center the other one on the unit, and command it to move to the last one. The first and last locatio should be placed in a line, and make a trigger so that when it goes to the end, the air unit gets removed. Also, make a trigger so that if P'?'' brings exactly 0 pylon, create 1 pylon at 'air unit location'
Report, edit, etc...Posted by (Dual)Archon on 2005-01-14 at 23:53:07
Well you could make a bunch of small locations or just place em there freehand i prefer more work tho lol happy.gif
Report, edit, etc...Posted by (U)Bolt_Head on 2005-01-15 at 01:41:15
Buildings cannot be displaced when being created thats why it only creates one.

Even if you were creating 'men' then they still wouldn't form a line just because of your location size. The location size doesn't effect the spawning of units what-so-ever

PS. Why won't burrowed grid system work? Is it because you don't think you can place pylons on burrowed units (because you can) or is there some other reason?
Report, edit, etc...Posted by MapUnprotector on 2005-01-15 at 01:49:31
QUOTE((U)Bolt_Head @ Jan 15 2005, 02:41 AM)
Buildings cannot be displaced when being created thats why it only creates one.

Even if you were creating 'men'  then they still wouldn't form a line just because of your location size.   The location size doesn't effect the spawning of units what-so-ever

PS.  Why won't burrowed grid system work?  Is it because you don't think you can place pylons on burrowed units (because you can) or is there some other reason?
[right][snapback]125651[/snapback][/right]


I dont think he knows about the burrowed grid. Drakiel try placing burrowed units in the line that you want, then have a trigger like this.

Condition:
Player that owns burrowed units has at least 1 burrowed unit

Action:
Centerlocation "location" on burrowed unit at anywhere
create unit that you want
give all burrowed unit at "location" to another player
Preserve

you can also do other things with a burrowed unit grid, like picking out a certain burrowed unit to center a location on by giving units back and forth between 2 players like

O O O O O

say you have a row of 4 burrowed units
but you want the second to last one to create a building on

SC gives units in a certain order from bottom left, and in this case from left to right
so then you just give the units to another player

O O O O

then again

O O O O

so then if you do center location on burrowed unit owned by Red it would pick the one on the right.

Also when using this, use a drone or lurker, because when you give units to other players, other burrowed units unburrow.
Report, edit, etc...Posted by (U)Bolt_Head on 2005-01-15 at 01:57:53
QUOTE(devilesk @ Jan 15 2005, 12:49 AM)
I dont think he knows about the burrowed grid. Drakiel try placing burrowed units in the line that you want, then have a trigger like this.
[right][snapback]125655[/snapback][/right]


I think he knows about it but doesn't think it will work since he wants to use a pylon. And will need to recreate the pylon several times. I figured he said it won't work because he doesn't know of a way to get a pylon to create in the spot where the burrowed ling is, because you can't directly create a building on top of a burrowed unit.

(unless it is a addon i think, or maybe neutral i don't know)
Report, edit, etc...Posted by Drakiel on 2005-01-15 at 09:43:08
Just in conclusion to this topic.

Thanks a bunch guys.

I COMPLETELY forgot about the burrowing grid system.
I haven't needed it, nor heard about it in quite a long time.

Thanks again
Report, edit, etc...Posted by terrenblade on 2005-01-15 at 15:12:32
why do you need to create the buildings? why not just give them to the player as the energy goes up/down

you can use one location for each level of energy that way, if you arange the pylons so that all the sets are matching up === for example.
Next Page (1)