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.
[10:18 pm]
Vrael -- who says I'm not a total madman?
[02:26 pm]
UndeadStar -- Vrael, since the ad messages get removed, you look like a total madman for someone that come late
[2024-5-02. : 1:19 pm]
Vrael -- IM GONNA MANUFACTURE SOME SPORTBALL EQUIPMENT WHERE THE SUN DONT SHINE BOY
[2024-5-02. : 1:35 am]
Ultraviolet -- Vrael
Vrael shouted: NEED SOME SPORTBALL> WE GOT YOUR SPORTBALL EQUIPMENT MANUFACTURING
Gonna put deez sportballs in your mouth
[2024-5-01. : 1:24 pm]
Vrael -- NEED SOME SPORTBALL> WE GOT YOUR SPORTBALL EQUIPMENT MANUFACTURING
[2024-4-30. : 5:08 pm]
Oh_Man -- https://youtu.be/lGxUOgfmUCQ
[2024-4-30. : 7:43 am]
NudeRaider -- Vrael
Vrael shouted: if you're gonna link that shit at least link some quality shit: https://www.youtube.com/watch?v=uUV3KvnvT-w
Yeah I'm not a big fan of Westernhagen either, Fanta vier much better! But they didn't drop the lyrics that fit the situation. Farty: Ich bin wieder hier; nobody: in meinem Revier; Me: war nie wirklich weg
[2024-4-29. : 6:36 pm]
RIVE -- Nah, I'm still on Orange Box.
[2024-4-29. : 4:36 pm]
Oh_Man -- anyone play Outside the Box yet? it was a fun time
[2024-4-29. : 12:52 pm]
Vrael -- if you're gonna link that shit at least link some quality shit: https://www.youtube.com/watch?v=uUV3KvnvT-w
Please log in to shout.


Members Online: RIVE, Roy