Location
This topic is locked. You can no longer write replies here.
Aug 21 2010, 10:36 am
By: Voice Of Korhal  

Aug 21 2010, 10:36 am Voice Of Korhal Post #1



How do you make a location follow a unit? So that location is constantly "on" the unit. Also, how do you make a location move to a building if it is made? I remember a game where if you made a zealot, 4 ghosts would appear around your unit, regardless where you move them, so I don't think that's a stationary location. And about the 2nd question, then what explains turret D spiral? How does the trigger know where to teleport your rines/ghosts when you make a supply depot/bunker?



None.

Aug 21 2010, 10:54 am DevliN Post #2

Woah

It's been a while since I've looked at the SC1 editor, but the following should work.

First off, to have a location follow a unit, make sure you have Hyper Triggers in your map. Create a location big enough for the unit and whatever else you'd want in that area. With one trigger, create the following:
Trigger
Players
  • Player 1
  • Conditions
  • Current Player brings exactly 1 UNIT to Anywhere.
  • Actions
  • Preserve trigger
  • Move UNIT FOLLOW (location) to UNIT owned by Current Player at Anywhere

  • As long as the unit being followed exists, the location should move to that unit. This becomes more complicated depending on what you need the location to do.

    For something like creating 4 Ghosts around a Zealot at a stationary location surrounding the Gateway, you'd need a Condition that looks for the Zealot (i.e. Current Player brings at least 1 Zealot to LOCATION AROUND GATEWAY) and then an action that creates the Ghosts (i.e. Remove 1 Zealot at LOCATION AROUND GATEWAY, Create 4 Ghosts for Current Player).

    For something like creating 4 Ghosts around a Zealot at a location that moves to a newly built gateway, you'd need a Condition that looks for the Gateway and moves the location to it. Then create a trigger that looks for the Zealot in that location, and create the 4 Ghosts (like the previous example).

    For the various bunker defense maps, it becomes even more complicated. The simple explanation is that you have 2 locations (one 3x3 square and one 3x2 rectangle) that move to the created Supply Depot. Then with one trigger, you remove the Supply Depot in the rectangular (3x2) location, and immediately create a bunker. Then, create the Marines, Ghosts, or Firebats at the larger square (3x3) location and run the AI script to enter closest bunker at the square location. This can be done with 1 trigger, but sometimes it's just easier to break it into 2.



    :devlin: Currently Working On: :devlin:
    Myself

    Aug 21 2010, 11:47 am Ahli Post #3

    I do stuff and thingies... Try widening and reducing the number of small nooks and crannies to correct the problem.

    I think I've made the simplest, well working method.
    If you have questions regarding my triggers, just ask. ;)

    Attachments:
    bunkerDefexample.scm
    Hits: 2 Size: 39.09kb




    Aug 21 2010, 12:10 pm Voice Of Korhal Post #4



    Thanks for the fast replies guys. I had NO idea there was an action to move a unit ._.

    And about your test map, I'm fascinated by it, but I don't get the point of the last trigger. There's no map revealer, so why would you move it to one? Wouldn't that result in an error? And what's the point of moving the location away anyways, since making the location return to a default location has no point..

    Also, what's the point of "hypertriggers?" All I see it doing is waiting for 0 MS multiple times and repeating it.... and on top of that, you make 3 of them. Why?



    None.

    Aug 21 2010, 12:22 pm DevliN Post #5

    Woah

    A very simplistic explanation for Hyper Triggers is that they make the "Preserve trigger" action work instantly. Without them, it takes a second or two (I don't remember the exact amount off the top of my head) for a trigger to activate again after it has activated once already. With a trigger constantly waiting for 0 MS, it essentially tricks the map into trying to do everything at once rather than take its time, and the end result is quicker triggers. You rarely see a SC1 map without them nowadays since so many maps rely on the "Preserve trigger" action.



    :devlin: Currently Working On: :devlin:
    Myself

    Aug 21 2010, 12:25 pm NudeRaider Post #6

    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

    Moving a location to a non-existent unit forces the location to center on the location you're searching in.

    We got a wiki article about hyper triggers... somewhere... I'll dig it up, but in the mean time suffice to say that it accelerates the rate at which triggers are checked by 16 which means that every game second triggers are checked 8 times. It's very useful to increase responsiveness of triggers and thus every map should feature them.
    There: http://www.staredit.net/starcraft/Hyper_triggers




    Aug 21 2010, 12:33 pm Voice Of Korhal Post #7



    Do you have to put "wait" an EXACT number of times?

    And also, I still don't get the point of moving the location away from the bunker once it has centered onto it. Is this manditory?



    None.

    Aug 21 2010, 12:44 pm Ahli Post #8

    I do stuff and thingies... Try widening and reducing the number of small nooks and crannies to correct the problem.

    Quote from Voice Of Korhal
    There's no map revealer, so why would you move it to one? Wouldn't that result in an error? And what's the point of moving the location away anyways, since making the location return to a default location has no point..
    That action is there to unverify the condition. Without that action, the condition would be true everytime after you have created 1 Bunker because the Marines stay in the Bunker. So you would disable the doodad state multiple times (which can cause crashes afaIk).

    edit:
    Even if there is no Map Revealer the Location will be centered. If there is no such unit, the location will be centered in the middle of the other location.

    -Why map revealer?
    I've put a Map Revealer because you have to type in a unit in the action. I could have used Command Center, too. Everything would work as long as the location won't be able to be in the center of a bunker anymore.




    Aug 21 2010, 1:14 pm Voice Of Korhal Post #9



    Oh I get it now. Thanks :)



    None.

    Aug 21 2010, 3: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 Voice Of Korhal
    Do you have to put "wait" an EXACT number of times?
    No. How many waits you use depends on how much time you want until the next NEO. NEO = Next Ending Occurence is the event when all wait stacks have been processed so there's 1 normal-duration trigger loop (2 game seconds) until the hyper triggers kick in again. It's common to use 3x62 waits which puts the NEO at about 5-6 hours of game time which is more than enough even for the longest maps.
    Check my link above for more info about NEO.




    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.
    [2026-4-17. : 4: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: JohnnyTheWolf