Staredit Network > Forums > SC1 UMS Mapmaking Assistance > Topic: Stacking buildings via triggers
Stacking buildings via triggers
Jul 10 2013, 6:46 am
By: Ghost_Sigma  

Jul 10 2013, 6:46 am Ghost_Sigma Post #1



Hi, how make triggers to stack buildings, i want stack hatcheries and i read the wiki (staredit.net/starcraft/Stacking)
Quote from name:Wiki
There are two different ways to stack buildings during a match. The first requires that you choose a location for the stacked buildings, and stack a group of other buildings at that spot. During a match, when you move or remove one of those stacked buildings (via triggers), you can then move another building to that location; it will take the place of the removed building and stack with the others.

i have 8 power generator stacked in hatchery location "h1", and 8 stacked hatchery in "center"
this is what i did:

Trigger("All players"){
Conditions:
Bring("Current Player", "Zerg Overlord", "1", At least, 1);

Actions:
Remove Unit At Location("All players", "Power Generator", 1, "h1");
Move Unit("All players", "Zerg Hatchery", 1, "center", "h1");
Remove Unit At Location("All players", "Power Generator", 1, "h1");
Move Unit("All players", "Zerg Hatchery", 1, "center", "h1");
Remove Unit At Location("All players", "Power Generator", 1, "h1");
Move Unit("All players", "Zerg Hatchery", 1, "center", "h1");
Remove Unit At Location("All players", "Power Generator", 1, "h1");
Move Unit("All players", "Zerg Hatchery", 1, "center", "h1");
Remove Unit At Location("All players", "Power Generator", 1, "h1");
Move Unit("All players", "Zerg Hatchery", 1, "center", "h1");
Remove Unit At Location("All players", "Power Generator", 1, "h1");
Move Unit("All players", "Zerg Hatchery", 1, "center", "h1");
Remove Unit At Location("All players", "Power Generator", 1, "h1");
Move Unit("All players", "Zerg Hatchery", 1, "center", "h1");
Remove Unit At Location("All players", "Power Generator", 1, "h1");
Move Unit("All players", "Zerg Hatchery", 1, "center", "h1");
Give Units to Player("All players", "Current Player", "Zerg Hatchery", All, "h1");
}

and this move only one hatchery instead of eight.

im looking for a method to stack hatchery via triggers because if i stack them with scmdraft they will come with full creep at beginning of the map. if there is another simple way to create stacked hatchery without creep ill be very thankful.

thanks :)

Post has been edited 1 time(s), last time on Jul 11 2013, 6:34 pm by Ghost_Sigma.



None.

Jul 10 2013, 7:11 am jjf28 Post #2

Cartography Artisan

I think your problem is that the 'move unit' trigger keeps applying to the same hatchery.

You could either have the hatcheries at a location that has higher selection priority so move unit chooses from those hatcheries, or you could create a location around the hatcheries and move from that location to your destination or you could have the hatcheries initially start as one player, and move unit only for that player, then give them to the desired player.

I also think that you only need to remove one unit from the stacking area in a trigger cycle, so when you get it working you should try with just one power generator.



TheNitesWhoSay - Clan Aura - github

Reached the top of StarCraft theory crafting 2:12 AM CST, August 2nd, 2014.

Jul 10 2013, 7:59 am Devourer Post #3

Hello

Possible that a larva (e.G. from the first teleported hatchery) blocks the location?
However, it really had been ages since I touched SC1-Mapping, but I remember a different behavior from Zerg structures in terms of stacking.
Try replacing the hatcheries with greater spires, and if that does not work, with command centers. See if it actually is the trigger's fault or some problems regarding Zerg.

See farty's solution below.

Post has been edited 1 time(s), last time on Jul 10 2013, 9:34 am by Devourer.



Please report errors in the Staredit.Network forum.

Jul 10 2013, 9:32 am O)FaRTy1billion[MM] Post #4

👻 👾 👽 💪

I don't have any problems in doing this...
Code
Trigger("Player 1"){
Conditions:
    Always();

Actions:
    Remove Unit At Location("Player 1", "Power Generator", 1, "gen");
    Move Unit("Player 1", "Zerg Hatchery", 1, "hat", "gen");
    Remove Unit At Location("Player 1", "Power Generator", 1, "gen");
    Move Unit("Player 1", "Zerg Hatchery", 1, "hat", "gen");
    Remove Unit At Location("Player 1", "Power Generator", 1, "gen");
    Move Unit("Player 1", "Zerg Hatchery", 1, "hat", "gen");
    Remove Unit At Location("Player 1", "Power Generator", 1, "gen");
    Move Unit("Player 1", "Zerg Hatchery", 1, "hat", "gen");
    Remove Unit At Location("Player 1", "Power Generator", 1, "gen");
    Move Unit("Player 1", "Zerg Hatchery", 1, "hat", "gen");
    Remove Unit At Location("Player 1", "Power Generator", 1, "gen");
    Move Unit("Player 1", "Zerg Hatchery", 1, "hat", "gen");
    Remove Unit At Location("Player 1", "Power Generator", 1, "gen");
    Move Unit("Player 1", "Zerg Hatchery", 1, "hat", "gen");
    Remove Unit At Location("Player 1", "Power Generator", 1, "gen");
    Move Unit("Player 1", "Zerg Hatchery", 1, "hat", "gen");
}


The only thing I can think of is if you are trying to move them to unbuildable terrain or if any ground units are blocking the hatchery from moving.

Also it isn't exactly necessary to move the hatcheries, is it? You can always create them with triggers.

(I attached my test map)

Attachments:
hatstack.scx
Hits: 2 Size: 50.97kb



TinyMap2 - Latest in map compression! ( 7/09/14 - New build! )
EUD Action Enabler - Lightweight EUD/EPD support! (ChaosLauncher/MPQDraft support!)
EUDDB - topic - Help out by adding your EUDs! Or Submit reference files in the References tab!
MapSketch - New image->map generator!
EUDTrig - topic - Quickly and easily convert offsets to EUDs! (extended players supported)
SC2 Map Texture Mask Importer/Exporter - Edit texture placement in an image editor!
\:farty\: This page has been viewed [img]http://farty1billion.dyndns.org/Clicky.php?img.gif[/img] times!

Jul 11 2013, 6:31 pm Ghost_Sigma Post #5



:D
thank you very much, now it works :D

but, i still dont like that method, im sure there is a better way to create stacked hatcherys.
anyway its working, thanks again. :)



None.

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[01:53 am]
Ultraviolet -- :lol:
[06:51 pm]
Vrael -- It is, and I could definitely use a company with a commitment to flexibility, quality, and customer satisfaction to provide effective solutions to dampness and humidity in my urban environment.
[06:50 pm]
NudeRaider -- Vrael
Vrael shouted: Idk, I was looking more for a dehumidifer company which maybe stands out as a beacon of relief amidst damp and unpredictable climates of bustling metropolises. Not sure Amazon qualifies
sounds like moisture control is often a pressing concern in your city
[06:50 pm]
Vrael -- Maybe here on the StarEdit Network I could look through the Forums for some Introductions to people who care about the Topics of Dehumidifiers and Carpet Cleaning?
[06:49 pm]
Vrael -- Perhaps even here I on the StarEdit Network I could look for some Introductions.
[06:48 pm]
Vrael -- On this Topic, I could definitely use some Introductions.
[06:48 pm]
Vrael -- Perhaps that utilizes cutting-edge technology and eco-friendly cleaning products?
[06:47 pm]
Vrael -- Do you know anyone with a deep understanding of the unique characteristics of your carpets, ensuring they receive the specialized care they deserve?
[06:45 pm]
NudeRaider -- Vrael
Vrael shouted: I've also recently becoming interested in Carpet Cleaning, but I'd like to find someone with a reputation for unparalleled quality and attention to detail.
beats me, but I'd make sure to pick the epitome of excellence and nothing less.
[06:41 pm]
Vrael -- It seems like I may need Introductions to multiple companies for the Topics that I care deeply about, even as early as Today, 6:03 am.
Please log in to shout.


Members Online: Wing Zero, Roy