Staredit Network > Forums > SC1 UMS Mapmaking Assistance > Topic: Transitioning between locations
Transitioning between locations
May 16 2017, 7:44 am
By: Ghoster  

May 16 2017, 7:44 am Ghoster Post #1



Ok, so it seems to be very trivial and basic feature of most RPG maps that are being made, but I struggle with it and somehow I didn't encounter any tutorials about this one.

I have about 35 different locations in my map (areas between which the player can move only through certain locations/caves on cliffs and so on) and I want him to transit between them having displayed a message about the place he's entering at given moment and not going back to the previous area if he haven't went a bunch of meters forward. What am I doing wrong and why is it not working?

Trig 1:
'Transition Blocade' is Cleared.
'Player is in Edge Station' is Set.
Player 1 brings at least 1 Terran Ghost to 'Transition - Edge Station to Border Hills'.
- - -
Set 'Player is in Border Hills'.
Clear 'Player is in Edge Station'.
Set 'Transition Blocade'.
Move All Terran Ghost for Player 1 at 'Transition - Edge Station to Border Hills' to 'Transition - Border Hills to Edge Station'.
Preserve trigger.

Trig 2:
'Transition Blocade' is Set.
Player 1 brings exactly 0 Terran Ghost to 'Transition - Edge Station to Border Hills".
- - -
Clear 'Transition Blocade'.

Two identical triggers are made the other way around. Why is this not working? The Ghost just stays at the second location and is unable to get the triggers running the other direction. Thank you in advance!




May 16 2017, 5:55 pm NudeRaider Post #2

We can't explain the universe, just describe it; and we don't know whether our theories are true, we just know they're not wrong. >Harald Lesch

The logic is sound (if the 2nd trigger is preserved) so it's likely a small mishap or something else interfering, so it would be useful if you posted the actual triggers (text trigs) or the entire map.




May 20 2017, 11:38 am Ghoster Post #3



I can't really check the text triggers in SCMdraft, because the tree is buggy (just as it says), it doesn't load any triggers from the tree.
Ok, so preserving the second trigger was indeed an issue, but it doesn't work yet.

Quote from "Trigger 1"
Players: 1

Conditions:
'Transition Blocade' is Cleared.
'Player is in Edge Station' is Set.
Player 1 brings at least 1 Terran Ghost to 'Transition - Edge Station to Border Hills'.

Actions:
Set 'Transition Blocade'.
Clear 'Player is in Edge Station'.
Set 'Player is in Border Hills'.
Move All Terran Ghost for Player 1 at 'Transition - Edge Station to Border Hills' to 'Transition - Border Hills to Edge Station'.
Wait for 3000 milliseconds.
Preserve trigger.

Quote from "Trigger 2"
Player 1

Conditions:
'Transition Blocade' is Set.
Player 1 brings exactly 0 Terran Ghost to 'Transition - Edge Station to Border Hills'.

Actions:
Wait for 2000 milliseconds.
Clear 'Transition Blocade'.
Preserve trigger.

Quote from "Trigger 3"
Players: 1

Conditions:
'Transition Blocade' is Cleared.
'Player is in Border Hills' is Set.
Player 1 brings at least 1 Terran Ghost to 'Transition - Border Hills to Edge Station'.

Actions:
Set 'Transition Blocade'.
Clear 'Player is in Border Hills'.
Set 'Player is in Edge Station'.
Move All Terran Ghost for Player 1 at 'Transition - Border Hills to Edge Station' to 'Transition - Edge Station to Border Hills'.
Wait for 3000 milliseconds.
Preserve trigger.

Quote from "Trigger 4"
Player 1

Conditions:
'Transition Blocade' is Set.
Player 1 brings exactly 0 Terran Ghost to 'Transition - Edge Station to Border Hills'.

Actions:
Wait for 2000 milliseconds.
Clear 'Transition Blocade'.
Preserve trigger.

I tried to change the order of triggers, but it didn't do much. Now the ghost keeps switching between the locations, while I want him to not execute the entering trigger if he hasen't walked out of it first.




May 20 2017, 4:43 pm O)FaRTy1billion[MM] Post #4

👻 👾 👽 💪

Waits like to cause a lot of problems and probably aren't necessary here. Also the second "clear transition blockade" has the same location as the first one. Was that a mistake in pasting the triggers here, or is it actually "Transition - Edge Station to Border Hills" and not "Transition - Border Hills to Edge Station" ?



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!

May 20 2017, 5:25 pm Ghoster Post #5



Ok, I deleted waits. Also this was only a mistake while pasting the triggers, in my map it's done the right direction. Still, the ghost keeps just switching between both positions into infinity.




May 20 2017, 5:30 pm O)FaRTy1billion[MM] Post #6

👻 👾 👽 💪

Ah, I think I figured it out. If the ghost isn't somehow in both locations at the same time, the switch gets cleared. Instead, combine the triggers to:
Trigger 2
Players

  • Player 1
  • Conditions

  • 'Transition Blocade' is Set.
  • Player 1 brings exactly 0 Terran Ghost to 'Transition - Edge Station to Border Hills'.
  • Player 1 brings exactly 0 Terran Ghost to 'Transition - Border Hills to Edge Station'.
  • Actions

  • Clear 'Transition Blocade'.
  • Preserve trigger.


  • Or alternatively, you could keep them separate (as it would be easier to expand to the 35 or whatever transition areas you said you have) by using the switches:

    Trigger 2
    Players

  • Player 1
  • Conditions

  • 'Transition Blocade' is Set.
  • 'Player is in Edge Station' is Set.
  • Player 1 brings exactly 0 Terran Ghost to 'Transition - Edge Station to Border Hills'.
  • Actions

  • Clear 'Transition Blocade'.
  • Preserve trigger.


  • Trigger 4
    Players

  • Player 1
  • Conditions

  • 'Transition Blocade' is Set.
  • 'Player is in Border Hills' is Set.
  • Player 1 brings exactly 0 Terran Ghost to 'Transition - Border Hills to Edge Station'.
  • Actions

  • Clear 'Transition Blocade'.
  • Preserve trigger.


  • EDIT: Sorry, I think I got the switches reversed. It should be fixed now.

    Post has been edited 1 time(s), last time on May 20 2017, 5:37 pm by FaRTy1billion.



    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!

    May 20 2017, 6:43 pm Ghoster Post #7



    Thanks, now it works perfectly fine (after upgrading the triggers a little bit - for reasons unknown I need to use the action "center view" twice in one trigger for it to center the location perfectly on the transition-locations, but it won't be much of a problem.
    Will that be okay to use this thread as a thread for all future questions about the triggers in the map I'm making, or will I have to make a new thread every time? I am almost sure there'll be plenty of those.




    May 20 2017, 6:59 pm Ghoster Post #8



    Thanks, now it works perfectly fine (after upgrading the triggers a little bit - for reasons unknown I need to use the action "center view" twice in one trigger for it to center the location perfectly on the transition-locations, but it won't be much of a problem.
    Will that be okay to use this thread as a thread for all future questions about the triggers in the map I'm making, or will I have to make a new thread every time? I am almost sure there'll be plenty of those.

    EDIT:
    Well, unfortunately making next triggers for the other transition-locations it happens again - ghost keeps switching between Border Hills and Edge Station. The equivalents of triggers 2 and 4 for the other transitions are the cause of it.




    May 23 2017, 2:29 pm Ghoster Post #9



    Sorry for multiposting, I hope someone can delete my previous messages.
    So I've done these triggers, which in theory should work well and I they did when I got only those four, but as I made more such triggers for other transitions between different locations, those do not function anymore. This pattern of 4 triggers was made for any other transition in the other locations, but ghost just enters the Border Hills, and then immediately goes back to Edge Hills, where he stays (which means the trigger somehow works fine only in one direction), and after walking out of the transition location and walking into it again, he does the same thing. Those four triggers on their own work perfectly, but they stop doing so when identical triggers for other locations are made, but I don't understand why, since the conditions are so specific and it's impossible for switches of the other triggers to be triggered all on their own by anything. Help?

    Trigger 1
    Players

  • Player 1
  • Conditions

  • 'Transition Blocade' is Cleared.
  • 'Player is in Edge Station' is Set.
  • 'Player is in Border Hills' is Cleared.
  • Player 1 brings at least 1 Terran Ghost to "Transition - Edge Station to Border Hills'.
  • Actions

  • Center view for current player at 'Transition - Border Hills to Edge Station'.
  • Clear 'Player is in Edge Station'.
  • Set 'Player is in Border Hills'.
  • Move All Terran Ghost for Player 1 at 'Anywhere' to 'Transition - Border Hills to Edge Station".
  • Set 'Transition Blocade'.
  • Display for current player: X
  • Center view for current player at 'Transition - Border Hills to Edge Station'
  • Preserve trigger.


  • Trigger 2
    Players

  • Player 1
  • Conditions

  • 'Transition Blocade' is Cleared.
  • 'Player is in Edge Station' is Cleared.
  • 'Player is in Border Hills' is Set.
  • Player 1 brings at least 1 Terran Ghost to "Transition - Border Hills to Edge Station'.
  • Actions

  • Center view for current player at 'Transition - Edge Station to Border Hills'.
  • Set 'Player is in Edge Station'.
  • Clear 'Player is in Border Hills'.
  • Move All Terran Ghost for Player 1 at 'Anywhere' to 'Transition - Edge Station to Border Hills".
  • Set 'Transition Blocade'.
  • Display for current player: X
  • Center view for current player at 'Transition - Edge Station to Border Hills'
  • Preserve trigger.


  • Trigger 3
    Players

  • Player 1
  • Conditions

  • 'Transition Blocade' is Set.
  • 'Player is in Edge Station' is Set.
  • 'Player is in Border Hills' is Cleared.
  • Player 1 brings exactly 0 Terran Ghost to "Transition - Border Hills to Edge Station'.
  • Player 1 brings exactly 0 Terran Ghost to "Transition - Edge Station to Border Hills'.
  • Actions

  • Clear 'Transition Blocade',
  • Preserve trigger.


  • Trigger 4
    Players

  • Player 1
  • Conditions

  • 'Transition Blocade' is Set.
  • 'Player is in Edge Station' is Cleared.
  • 'Player is in Border Hills' is Set.
  • Player 1 brings exactly 0 Terran Ghost to "Transition - Border Hills to Edge Station'.
  • Player 1 brings exactly 0 Terran Ghost to "Transition - Edge Station to Border Hills'.
  • Actions

  • Clear 'Transition Blocade',
  • Preserve trigger.


  • Post has been edited 5 time(s), last time on May 24 2017, 7:41 pm by Ghoster.




    May 23 2017, 4:11 pm NudeRaider Post #10

    We can't explain the universe, just describe it; and we don't know whether our theories are true, we just know they're not wrong. >Harald Lesch

    Quote from Ghoster
    Sorry for multiposting, I hope someone can delete my previous messages.
    This is entirely fine if you come back a few days later with new information.




    May 24 2017, 7:38 pm Ghoster Post #11



    This is very confusing. Somehow the "Player is in Edge Station" switch is not being cleared when entering Border Hills. No other triggers in the game are interacting with those switches. Maybe someone is able to create such triggers, which will allow to transition between locations this way? I'd be very glad (and, of course, I'd be ahead with my map, which I'd like to share with the community once it's done.




    May 24 2017, 10:35 pm rockz Post #12

    ᴄʜᴇᴇsᴇ ɪᴛ!

    You need to figure out which trigger isn't running to fix this. I would recommend posting the map and/or the text triggers.



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

    May 25 2017, 5:54 am Ghoster Post #13



    Ok, so this is the map file.
    Obviously all the triggers are running, because the ghost does change his position.




    May 25 2017, 7:13 pm rockz Post #14

    ᴄʜᴇᴇsᴇ ɪᴛ!

    Frankly, I don't know why it's not working. It looks like it should work, but your process is so convoluted with switches that it's just not working.

    This works though:

    Code
    Trigger("Player 1"){
    Conditions:
        Bring("Player 1", "Terran Ghost", "Transition - Edge Station to Border Hills", Exactly, 1);
        Switch("Transition Blocade", not set);

    Actions:
        Set Switch("Transition Blocade", set);
        Move Unit("Player 1", "Terran Ghost", All, "Anywhere", "Transition - Border Hills to Edge Station");
        Display Text Message(Always Display, "\x013\x005You're entering the location:\r\n\r\n\x013\x003:: \x004BORDER HILLS \x003::\r\n\r\n\x013\x003Crawlers feeding ground.\r\n\r\n\r\n\r\n\r\n");
        Center View("Transition - Border Hills to Edge Station");
        Preserve Trigger();
    }

    //-----------------------------------------------------------------//

    Trigger("Player 1"){
    Conditions:
        Bring("Player 1", "Terran Ghost", "Transition - Border Hills to Edge Station", Exactly, 1);
        Switch("Transition Blocade", not set);

    Actions:
        Set Switch("Transition Blocade", set);
        Move Unit("Player 1", "Terran Ghost", All, "Anywhere", "Transition - Edge Station to Border Hills");
        Display Text Message(Always Display, "\x013\x005You're entering the location:\r\n\r\n\x013\x003:: \x004EDGE STATION \x003::\r\n\r\n\x013\x003Entrance to the Sphere.\r\n\r\n\r\n\r\n\r\n");
        Center View("Transition - Edge Station to Border Hills");
        Preserve Trigger();
    }

    //-----------------------------------------------------------------//

    Trigger("Player 1"){
    Conditions:
        Bring("Player 1", "Terran Ghost", "Transition - Edge Station to Border Hills", Exactly, 0);
        Bring("Player 1", "Terran Ghost", "Transition - Border Hills to Edge Station", Exactly, 0);
        Switch("Transition Blocade", set);

    Actions:
        Comment("Blocade - Border Hills to Edge Station");
        Set Switch("Transition Blocade", clear);
        Preserve Trigger();
    }

    //-----------------------------------------------------------------//



    You're making this so much harder on yourself by using switches and trying to lock the player down to a location.

    Also, consider instead of using locations, try using a burrowed/cloaked unit. Ion cannons can actually be completely cloaked, take up little space, and they'll never move. Their hitbox is also exactly the placement size, so it's a bit easier to place. Otherwise you can use a burrowed defiler at the location too.

    Code
    Trigger("Player 1"){
    Conditions:
        Bring("Player 8", "Ion Cannon", "Moving Player Location", Exactly, 0);
        Switch("Transition Blocade", set);

    Actions:
        Comment("Blocade - Border Hills to Edge Station");
        Set Switch("Transition Blocade", clear);
        Preserve Trigger();
    }

    //-----------------------------------------------------------------//




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

    May 26 2017, 6:27 pm Ghoster Post #15



    Well, the problem is, that I need Player to activate those switches "Player in X", because player entering those locations activates and disactivates many different events. Above that I tried to use the "3 trigger option" that was mentioned above, and it worked fine until I realised that there can be only 16 condition in a trigger. This is crucial, because there's about 30 locations on the map, so if I'll run out of place, making second similar trigger for the blocade release start to interfere with the first one switching the blocade to clear, just because player isn't in one of the second 15 locations.

    Post has been edited 1 time(s), last time on May 26 2017, 6:51 pm by Ghoster.




    May 26 2017, 10:30 pm rockz Post #16

    ᴄʜᴇᴇsᴇ ɪᴛ!

    Quote from Ghoster
    Well, the problem is, that I need Player to activate those switches "Player in X", because player entering those locations activates and disactivates many different events.
    Switches are just an amalgamation of conditions.

    For example, if you set A = B and B = C, A = C.

    Let's say you have 2 triggers:
    If player 1 brings 1 ghost to location 1
    then set switch 1

    If switch 1 is set
    then do action

    So why can't you do this?
    If player 1 brings 1 ghost to location 1
    then do action

    Quote from Ghoster
    Above that I tried to use the "3 trigger option" that was mentioned above, and it worked fine until I realised that there can be only 16 condition in a trigger. This is crucial, because there's about 30 locations on the map, so if I'll run out of place, making second similar trigger for the blocade release start to interfere with the first one switching the blocade to clear, just because player isn't in one of the second 15 locations.
    My third recommendation was to remove the locations entirely and use a burrowed/cloaked unit to set/clear the blockade. This is simpler in the long run and is quite expandable without the need to make any additional trigger changes. This is the most logical method and the simplest to trigger. It's obviously not the most optimal, especially if you have detection, however there are ways to get detection of a a player without giving vision and without using a detector (though some units may flicker) so long as you don't use blind.

    Additionally, switches are just bits. They're somewhat useful, but infinitely inferior to Deaths of unused units. They can be bits, but they can store additional data, organized into matrices via players, and they can be exclusive (each location is assigned a number rather than a bit, which means that it's impossible to mess up and be in 2 locations at once) which makes troubleshooting easier.

    For example, what if you use Deaths of cantina to keep track of where the player is (if you don't want to use that giant location and a bring ghost condition) and deaths of cave to keep track of where the player was? Note that I'm writing these triggers manually, you may need to edit them to fix them.

    Collapsable Box


    Originally I was thinking that figuring out where you were would be useful, and indeed it can be. You can store the blockade switch in that by adding 101 or 102 to the previous location and removing 100 when you're no longer on the location. Travel should only be possible if you're under 100 deaths. Additionally, switches are global, whereas with deaths, you can use "current player" and have each player store their own switches.

    There's also a third option for clearing the blockade using a single location: center a location on the unit when the unit is NOT in the location, meaning it's moved, and clear the blockade switch. I would recommend migrating to a death counter blockade though, so you can have varying levels of a blockade: 1= normal blockade. 2= super blockade that can't be removed until you defeat a boss/complete a quest. 0=no blockade.

    Hopefully this all makes sense. Let me know if you have any questions.



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

    May 28 2017, 3:20 am Dungeon-Master Post #17



    I cannot stress enough how much better the death counters are for data manipulation compared to switches. Like rockz said, you don't need to adjust the trigger to account for used-up switches since 'current player' death counter specifically saves data for just that one player.



    None.

    Options
      Back to forum
    Please log in to reply to this topic or to report it.
    Members in this topic: None.
    [01:56 am]
    Oh_Man -- cool bit of history, spellsword creator talking about the history of EUD ^
    [09:24 pm]
    Moose -- denis
    [05:00 pm]
    lil-Inferno -- benis
    [10:41 am]
    v9bettel -- Nice
    [2024-4-19. : 1:39 am]
    Ultraviolet -- no u elky skeleton guy, I'll use em better
    [2024-4-18. : 10:50 pm]
    Vrael -- Ultraviolet
    Ultraviolet shouted: How about you all send me your minerals instead of washing them into the gambling void? I'm saving up for a new name color and/or glow
    hey cut it out I'm getting all the minerals
    [2024-4-18. : 10:11 pm]
    Ultraviolet -- :P
    [2024-4-18. : 10:11 pm]
    Ultraviolet -- How about you all send me your minerals instead of washing them into the gambling void? I'm saving up for a new name color and/or glow
    [2024-4-17. : 11:50 pm]
    O)FaRTy1billion[MM] -- nice, now i have more than enough
    Please log in to shout.


    Members Online: jun3hong, Oh_Man