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.
    [02:27 am]
    Symmetry -- https://staredit.net/topic/18903/ THE REVIEWS ARE HERE! "ok these are pretty good memes" - ssj9Kevin
    [2026-7-17. : 2:58 pm]
    Ultraviolet -- Symmetry
    Symmetry shouted: Man I wish we had this tech back in the day when people played ums lmao
    fr fr
    [2026-7-17. : 2:39 am]
    Symmetry -- Man I wish we had this tech back in the day when people played ums lmao
    [2026-7-16. : 6:28 am]
    NudeRaider -- EUD actions, specifically. The conditions remained. Today we can even have actions again, but they're all virtualized/whitelisted (not sure on the actual technical implementation) so you can only use them for specific intended purposed, not arbitrary code injections.
    [2026-7-16. : 6:26 am]
    NudeRaider -- I mean yes, maps - through EUDs - were theoretically able to do that as well, but that was patched quickly.
    [2026-7-16. : 6:25 am]
    NudeRaider -- Symmetry
    Symmetry shouted: Ohhh imagine a SC map that could delete itself
    not the map, the editor
    [2026-7-16. : 2:28 am]
    Symmetry -- I vaguely remember Voy doing some ACE back in the day, but I had no idea EUDs could do that kind of shit. I am very much catching up on the technology
    [2026-7-16. : 2:28 am]
    Symmetry -- Ohhh imagine a SC map that could delete itself
    [2026-7-15. : 8:51 pm]
    NudeRaider -- Symmetry
    Symmetry shouted: NudeRaider Is EUD editor capable of writing shit onto the player's harddrive? That seems like it would be dangerous
    yeah an editor that isn't allowed to write files sounds rather pointless, so I'd assume it can. Like most other programs too btw. and yes, obviously that's dangerous, but also kinda necessary. MS introduced that virtualization for exactly that reason.
    [2026-7-15. : 4:10 am]
    Ultraviolet -- I don't think so. I think they shut that shit down after 1.16, maybe even earlier
    Please log in to shout.


    Members Online: O)FaRTy1billion[MM]