Staredit Network > Forums > SC1 UMS Mapmaking Assistance > Topic: Moving Buildings Help
Moving Buildings Help
May 23 2010, 6:15 pm
By: ironheart6  

May 23 2010, 6:15 pm ironheart6 Post #1



I'm having a problem moving buildings, specifically Photon Cannons after they have already been moved around. They are moving somewhat in a circle, going counterclockwise. After triggering them to be removed the cannons move to where I want them to. But when I try to trigger it again, changing up the actions a little, it wouldn't be removed so it wouldn't rotate anymore. Anyone can help me figure out what's wrong?

Attachments:
SC.bmp
Hits: 8 Size: 1971.05kb



None.

May 23 2010, 6:40 pm rockz Post #2

ᴄʜᴇᴇsᴇ ɪᴛ!

When you save images, save them as gif, png, or jpg. Gif and png are lossless formats. Gif is only lossless under 256 colors (which sc is), but png is 24 bit/pixel with zip compression. jpg is lossy but ideal for actual pictures/large complicated things. Pngs suit better for text/large blocks of the same color. You can also use an image host such as tinypic to post images, making it easier for us to view.

You aren't removing them. Remove for all players, or the correct player, and ensure the trigger is running. Debugging is an important part of triggering, and the steps you need to take are:
1) Ensure the trigger is running by placing a marker of some sort (create unit off screen to show error message, etc)
2) If the trigger isn't running, then the conditions aren't met. Simple
3) If the trigger is running, but the units aren't being moved/removed, then you have written that action incorrectly, or there is no room for them to be moved.

Posting triggers is infinitely more useful than pictures. You can copy/paste with text trigedit from SCMDraft.



"Parliamentary inquiry, Mr. Chairman - do we have to call the Gentleman a gentleman if he's not one?"

May 23 2010, 7:14 pm ironheart6 Post #3



Trigger("Player 1"){
Conditions:
Bring("Player 1", "Terran Civilian", "Up", Exactly, 1);

Actions:
Display Text Message(Always Display, "Up");
Display Text Message(Always Display, "Top goes to the left");
Move Unit("Player 1", "Terran Civilian", 1, "Up", "Top Start");
Preserve Trigger();

These would be my triggers for trying to move it around twice. Sorry if it's unclear, from Trigedit Alpha 1 in SCMD2.
Remove Unit At Location("Player 6", "Protoss Photon Cannon", All, "Red Column 3");
Remove Unit At Location("Player 4", "Protoss Photon Cannon", All, "Blue Row 1");
Remove Unit At Location("Player 8", "Protoss Photon Cannon", All, "Orange Column 1");
Remove Unit At Location("Player 9", "Protoss Photon Cannon", All, "Green Row 3");
Set Switch("Switch 1", set);
Preserve Trigger();

Trigger("Player 1"){
Conditions:
Switch("Switch 1", set);

Actions:
Move Unit("Player 6", "Protoss Photon Cannon", 1, "Red Cannons", "Blue 1");
Move Unit("Player 6", "Protoss Photon Cannon", 1, "Red Cannons", "Blue 2");
Move Unit("Player 6", "Protoss Photon Cannon", 1, "Red Cannons", "Blue 3");
Move Unit("Player 4", "Protoss Photon Cannon", 1, "Blue Cannons", "Orange 7");
Move Unit("Player 4", "Protoss Photon Cannon", 1, "Blue Cannons", "Orange 4");
Move Unit("Player 4", "Protoss Photon Cannon", 1, "Blue Cannons", "Orange 1");
Move Unit("Player 8", "Protoss Photon Cannon", 1, "Orange Cannons", "Green 9");
Move Unit("Player 8", "Protoss Photon Cannon", 1, "Orange Cannons", "Green 8");
Move Unit("Player 8", "Protoss Photon Cannon", 1, "Orange Cannons", "Green 7");
Move Unit("Player 9", "Protoss Photon Cannon", 1, "Green Cannons", "Red 3");
Move Unit("Player 9", "Protoss Photon Cannon", 1, "Green Cannons", "Red 6");
Move Unit("Player 9", "Protoss Photon Cannon", 1, "Green Cannons", "Red 9");
Set Switch("Switch 1", clear);
Preserve Trigger();

Trigger("Player 1"){
Conditions:
Bring("Player 1", "Terran Civilian", "Up", Exactly, 1);
Switch("Switch 1", not set);

Actions:
Display Text Message(Always Display, "Up");
Display Text Message(Always Display, "Top goes to the left");
Move Unit("Player 1", "Terran Civilian", 1, "Up", "Top Start");
Preserve Trigger();
Remove Unit At Location("Player 6", "Protoss Photon Cannon", All, "Blue Row 1");
Remove Unit At Location("Player 4", "Protoss Photon Cannon", All, "Orange Column 1");
Remove Unit At Location("Player 8", "Protoss Photon Cannon", All, "Green Row 3");
Remove Unit At Location("Player 9", "Protoss Photon Cannon", All, "Red Column 3");
Preserve Trigger();
Set Switch("Switch2", set);
Comment("Up Inverse\r\nTop Only");

Trigger("Player 1"){
Conditions:
Switch("Switch2", set);

Actions:
Move Unit("Player 6", "Protoss Photon Cannon", 1, "Red Cannons", "Orange 7");
Move Unit("Player 6", "Protoss Photon Cannon", 1, "Red Cannons", "Orange 4");
Move Unit("Player 6", "Protoss Photon Cannon", 1, "Red Cannons", "Orange 1");
Move Unit("Player 9", "Protoss Photon Cannon", 1, "Green Cannons", "Blue 1");
Move Unit("Player 9", "Protoss Photon Cannon", 1, "Green Cannons", "Blue 2");
Move Unit("Player 9", "Protoss Photon Cannon", 1, "Green Cannons", "Blue 3");
Move Unit("Player 4", "Protoss Photon Cannon", 1, "Blue Cannons", "Green 9");
Move Unit("Player 4", "Protoss Photon Cannon", 1, "Blue Cannons", "Green 8");
Move Unit("Player 4", "Protoss Photon Cannon", 1, "Blue Cannons", "Green 7");
Move Unit("Player 8", "Protoss Photon Cannon", 1, "Orange Cannons", "Red 3");
Move Unit("Player 8", "Protoss Photon Cannon", 1, "Orange Cannons", "Red 6");
Move Unit("Player 8", "Protoss Photon Cannon", 1, "Orange Cannons", "Red 9");
Preserve Trigger();
Set Switch("Switch2", clear);
Comment("Switch 1 Set\r\nUp Inverse");



None.

May 23 2010, 7:51 pm DavidJCobb Post #4



Lemme wrap my head around this... You pasted your triggers oddly, some appear to be cut off... Are these your triggers?

Trigger
Players
  • Player 1
  • Conditions
  • Player 1 brings exactly 1 Terran Civilian to Up.
  • Actions
  • Display for current player:Up
  • Display for current player:Top goes to the left
  • Move 1 Terran Civilian for Player 1 at Up to Top Start.
  • Preserve trigger.
  • Remove all Protoss Photon Cannon for Player 6 at Red Column 3.
  • Remove all Protoss Photon Cannon for Player 4 at Blue Row 1.
  • Remove all Protoss Photon Cannon for Player 8 at Orange Column 3.
  • Remove all Protoss Photon Cannon for Player 9 at Green Row 1.
  • Set Switch 1.
  • Preserve trigger.

  • Trigger
    Players
  • Player 1
  • Conditions
  • Switch 1 is set.
  • Actions
  • Move 1 Protoss Photon Cannon for Player 6 at Red Cannons to Blue 1.
  • Move 1 Protoss Photon Cannon for Player 6 at Red Cannons to Blue 2.
  • Move 1 Protoss Photon Cannon for Player 6 at Red Cannons to Blue 3.
  • Move 1 Protoss Photon Cannon for Player 4 at Blue Cannons to Orange 7.
  • Move 1 Protoss Photon Cannon for Player 4 at Blue Cannons to Orange 4.
  • Move 1 Protoss Photon Cannon for Player 4 at Blue Cannons to Orange 1.
  • Move 1 Protoss Photon Cannon for Player 8 at Orange Cannons to Green 9.
  • Move 1 Protoss Photon Cannon for Player 8 at Orange Cannons to Green 8.
  • Move 1 Protoss Photon Cannon for Player 8 at Orange Cannons to Green 7.
  • Move 1 Protoss Photon Cannon for Player 9 at Green Cannons to Red 3.
  • Move 1 Protoss Photon Cannon for Player 9 at Green Cannons to Red 6.
  • Move 1 Protoss Photon Cannon for Player 9 at Green Cannons to Red 9.
  • Clear Switch 1.
  • Preserve trigger.

  • Trigger
    Players
  • Player 1
  • Conditions
  • Player 1 brings exactly 1 Terran Civilian to Up.
  • Switch 1 is cleared.
  • Actions
  • Display for current player:Up
  • Display for current player:Top goes to the left
  • Move 1 Terran Civilian for Player 1 at Up to Top Start.
  • Preserve trigger.
  • Remove all Protoss Photon Cannon for Player 6 at Red Column 3.
  • Remove all Protoss Photon Cannon for Player 4 at Blue Row 1.
  • Remove all Protoss Photon Cannon for Player 8 at Orange Column 3.
  • Remove all Protoss Photon Cannon for Player 9 at Green Row 1.
  • Preserve trigger.
  • Set Switch 2.


  • I think rockz may be right, and you may need to change it to All Players for the Photons. Think about it.

    Assuming that your image shows where the Cannons are when the map starts, "Blue Cannons" is the bottom set, "Orange Cannons" is the right set, etc.. So at the start of the map, Player 4 (Blue) has Cannons in Blue Cannons. If you rotate the cannons one time, then Player 4 (Blue) does not have Cannons in Blue Cannons; instead, Player 8 (Orange) has cannons in Blue Cannons. However, if you try to rotate it a second time, your triggers still check for Player 4 (Blue) cannons in Blue Cannons.

    So what you'll need to do:
    • Move the Cannons directly, instead of removing them. Example: Move 1 Photon Cannon for All Players from Blue Row 1 to Red Column 1. It may be better to use a location per "cell" instead of a location per row/column.
    • Rename the locations. Once the Cannons have been rotated, "Blue Cannons" doesn't have any blue Photons in it; the name is therefore misleading. Give them names like "Top Cannons" or "North Cannons", following the same pattern for the other sides.

    EDIT: A simple guide for how I'd do this.


    Post has been edited 1 time(s), last time on May 23 2010, 7:59 pm by DavidJCobb.



    None.

    May 24 2010, 2:02 am Lanthanide Post #5



    Bear in mind that "all players" does not catch players that are not present in the game. Eg if Player 1 was absent from the beginning, or has left the game, you can still create units for Player 1, but conditions or actions using All Players will not affect those ghost Player 1 units. Instead you need to specifically apply the conditions/actions to that player.

    This means, if in your map any of the 4 players that own the cannons can leave at any point (or are absent from the start) and the map continues onwards without victory/defeat for the remaining players, you would need to have something more like this:
    Player 1 brings cannon to top
    Move cannon for Player 1 to right
    Player 2 brings cannon to top
    Move cannon for Player 2 to right
    etc

    If you have the cannons owned by CPU players that are always present in the game and have no victory of defeat triggers, you should be fine using All Players as David suggests.



    None.

    Options
      Back to forum
    Please log in to reply to this topic or to report it.
    Members in this topic: None.
    [03:57 am]
    NudeRaider -- https://staredit.net/381600/ You have 5 minutes, then you can only edit your posts.
    [04:05 pm]
    NudeRaider -- DarkenedFantasies
    DarkenedFantasies shouted: you eat lots of beans
    :lol:
    [2026-4-17. : 11:30 am]
    NudeRaider -- I would like 3000 minerals, please
    [2026-4-16. : 7:32 pm]
    Zoan -- I got $2000 bonus. I would like 2000 minerals, please
    [2026-4-16. : 4:15 am]
    DarkenedFantasies -- you eat lots of beans
    [2026-4-16. : 3:46 am]
    IskatuMesk -- how do i get gas
    [2026-4-15. : 11:43 pm]
    Moose -- you don't
    [2026-4-15. : 10:06 pm]
    Zoan -- how do i get minerals
    [2026-4-14. : 11:45 pm]
    ClansAreForGays -- Anyone wanna played Skewed StarCraft?
    [2026-4-14. : 12:07 am]
    Vrael -- NudeRaider
    NudeRaider shouted: Vrael ranting still is though
    you're a gentleman and a scholar, thank you
    Please log in to shout.


    Members Online: NudeRaider, Zoan, etherealtongue4