1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Tutorial: Center Location on Units [StarCraft]

Discussion in 'Maps and Replays' started by Imagine., Oct 29, 2009.

Tutorial: Center Location on Units [StarCraft]

Discussion in 'Maps and Replays' started by Imagine., Oct 29, 2009.

  1. Imagine.

    Imagine. New Member

    Joined:
    Jun 24, 2007
    Messages:
    1,260
    Likes received:
    4
    Trophy points:
    0
    CENTER LOCATION ON UNITS:
    ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦
    Want a location to constantly center on a certain unit? Here's how to do it:

    REQUIREMENTS:
    - Applicable players
    - One any unit
    - One location [ LOCATION 1 ]


    In this sample trigger, the condition to keep the location on that specific unit is ALWAYS. You can change the conditions to whatever you would like to achieved desired effects.

    Classic StarCraft Trigger Editor
    Text Trigger Editor
    Code:
    Trigger("Player X"){
    Conditions:
    	Always();
    
    Actions:
    	Move Location("Current Player", "Any unit", "Anywhere", "Location 1");
    	Preserve Trigger();
    }
    
    //-----------------------------------------------------------------//
     
  2. EatMeReturns

    EatMeReturns Happy Mapper Moderator

    Joined:
    Jun 28, 2007
    Messages:
    1,730
    Likes received:
    11
    Trophy points:
    38
    From:
    Albuquerque, New Mexico
    How will this work if the player has more than one of the unit? Will the location center in the middle of all of that unit? Or just on the first instance of that unit?
     
  3. RHStag

    RHStag New Member

    Joined:
    Mar 28, 2009
    Messages:
    386
    Likes received:
    1
    Trophy points:
    0
    It will randomly pick one of the unit.
     
  4. cautionmike_190

    cautionmike_190 New Member

    Joined:
    Mar 23, 2009
    Messages:
    380
    Likes received:
    2
    Trophy points:
    0
    From:
    Philippines
    humm sure is running
     
  5. ZelashOculah

    ZelashOculah New Member

    Joined:
    Feb 26, 2009
    Messages:
    144
    Likes received:
    0
    Trophy points:
    0
    From:
    Over There
    Oh nice, finally I know how the rp makers do it...