Map Editing SOS

Discussion in 'StarCraft 2 Maps, Replays, Modding' started by CivBase, Aug 15, 2010.

Map Editing SOS

  1. CivBase

    CivBase New Member

    Joined:
    Aug 15, 2010
    Messages:
    5
    Likes received:
    0
    Trophy points:
    0
    So, I just got Starcraft 2 two weeks ago and have been loving it, so I decided to get into map making, as I did with Red Alert 2 and a bit with Age of Empires 2 many moons ago. Luckily, this editor is pretty easy going despite the big switch from 2.5D to 3D. The bad news is I've still run into a fair share of hiccups and I figured I'd come here to try and iron them out.

    Triggers
    I know how triggers work and have used them extensively in other editors. My problem with the SC2 editor is that I'm not familiar with these (more advanced) triggers. If you could help me locate the appropriate actions/events/conditions for these, I'd appreciate it.

    1. I want to make it so that something happens when any unit belonging to a specific player enters a region. I can find the event and attach the region, I just can't figure out how to do the "Any Unit belonging to Player X" part.

    2. Similar to the first one, but I want this to only work for a certain type of unit (ie. Marine) belonging to a specific player.


    Space Terrain
    I managed to goof something up pretty bad with this map and I'd really like to be able to fix it. It's located on a space platform and somehow the area of the map that's supposed to be empty (where you see planets, stars, and asteroids) got filled in with a metal texture. It looks ugly and I'd really like to know how to get rid of it.

    Here's a screenshot.


    That's all for now, but I might have more if this stuff gets resolved. A million thanks if you can help.
     
  2. EatMeReturns

    EatMeReturns Happy Mapper Moderator

    Joined:
    Jun 28, 2007
    Messages:
    1,730
    Likes received:
    11
    Trophy points:
    38
    From:
    Albuquerque, New Mexico
    Trigger Problems:

    Event - Any Unit Enters REGION.
    Condition - Owner of Triggering Unit = SPECIFIC PLAYER
    Action - Whatever you want.

    Basically, the trigger will fire whenever a unit enters the region. However, the actions will only occur if all conditions are met. Triggering Unit refers to the unit that enters the region. This will test that the owner of the unit entering the region is the player you want it to be.

    For your second triggering question, add the following condition:
    Condition - Unit Type of Triggering Unit = SPECIFIC UNIT TYPE

    This will not only test if it is the correct player, but also if it is the correct unit type.


    Terrain Question:
    Go to the Terrain Module, select the Terrain Palette, and enter the Texture Brush menu. Select the second brush, called Remove Texture. Max out the Increment scale bar, and choose the paintbrush style (the solid style). Pick whatever shape and size you want, and left-click on the section you want to remove texture from. If this doesn't work, get back to me.
     
  3. z iJordaN o

    z iJordaN o Guest

    I didn't know there was a map editor and if there is where is it
     
  4. EatMeReturns

    EatMeReturns Happy Mapper Moderator

    Joined:
    Jun 28, 2007
    Messages:
    1,730
    Likes received:
    11
    Trophy points:
    38
    From:
    Albuquerque, New Mexico
    Inside of the Starcraft II program file. Usually in the folder Program Files.
     
  5. CivBase

    CivBase New Member

    Joined:
    Aug 15, 2010
    Messages:
    5
    Likes received:
    0
    Trophy points:
    0
    Gratsi! It didn't even cross my mind that the unit specifics would be a condition and not a part of the action. That's a whole lot more simple than I thought it'd end up being.

    The texture thing didn't work, unfortunately. It's doing some really weird stuff, though. Sometimes the texture is there and sometimes it shows through to the space background. I can't figure it out.
     
  6. EatMeReturns

    EatMeReturns Happy Mapper Moderator

    Joined:
    Jun 28, 2007
    Messages:
    1,730
    Likes received:
    11
    Trophy points:
    38
    From:
    Albuquerque, New Mexico
    I have no idea. Could be spontaneous data corruption. Try adding terrain there, then removing terrain.
     
  7. CivBase

    CivBase New Member

    Joined:
    Aug 15, 2010
    Messages:
    5
    Likes received:
    0
    Trophy points:
    0
    I'm back to work on the map after finally finishing the campaign.

    I think the terrain/space problem is just the editor going crazy, cuz it sometimes works and sometimes doesn't. I have a new issue now, though. Triggers again, but this time it's timers.

    What I'm trying to do is make a simple, 2-player king of the hill game. I have a region assigned as the hill. So long as a player has their unit in the hill, their timer will count down. When the player's timer reaches zero, that player wins. The timers are proving to be a little more difficult than anticipated.

    This trigger is supposed to set up the timers for the rest of the game. To prevent repetition, I only included the actions for Player 1.

    Events:
    • Game - Map initialization

    Actions:
    • Timer - Create a timer window for (New timer), with the title "Player 1", using Remaining time (initially Visible)
    • Timer - Start (New timer) as a One Shot timer that will expire in 600.0 Game Time seconds
    • Timer - Pause (New timer)

    I know I'm not setting this up right. How are the start and pause actions supposed to distinguish between the two timers? Am I supposed to manually put in a name in place of "New timer" in all of the triggers? I think there's supposed to be a variable name there for the start and pause triggers, but I don't know how to create the variable.
     
  8. EatMeReturns

    EatMeReturns Happy Mapper Moderator

    Joined:
    Jun 28, 2007
    Messages:
    1,730
    Likes received:
    11
    Trophy points:
    38
    From:
    Albuquerque, New Mexico
    Create a gobal variable of type "Timer" and right after you create the timer, add this action:

    Set Variable - GLOBALTIMERVARIABLE = (Last Created Timer/New Timer, whichever one is there, preferable Last Created Timer)

    This variable will let you distinguish the timer you created from all the other timers. If you have more then one timer, create more than one global timer variable and apply one variable to each created timer. This concept of storing Last Created anything in a variable is probably one of the most important concepts you can know. You will use it a lot. In fact, right now I'm working on a map with more than 200 dialog items. I use an array variable to distinguish between each item. Array variables are helpful in that while they are only one variable, they store X number of values. Each value stored has it's own I.D. number that you define when you access the variable in a trigger. You could use an array if you have more than one timer you wanna store, or you could just use more than one variable.
     
  9. CivBase

    CivBase New Member

    Joined:
    Aug 15, 2010
    Messages:
    5
    Likes received:
    0
    Trophy points:
    0
    You can set variables? o_O

    That's... that's amazing! I didn't even see the button for that. It's hidden unless I maximize the trigger windows.

    Thanks again!
     
  10. EatMeReturns

    EatMeReturns Happy Mapper Moderator

    Joined:
    Jun 28, 2007
    Messages:
    1,730
    Likes received:
    11
    Trophy points:
    38
    From:
    Albuquerque, New Mexico
    Correction:

    Setting variables will probably be one of the most important concepts you will learn with triggering. ;)
     
  11. CivBase

    CivBase New Member

    Joined:
    Aug 15, 2010
    Messages:
    5
    Likes received:
    0
    Trophy points:
    0
    Okay, another question. In this king of the hill map, I have set it up so that entering the hill sets off a trigger. The triggering unit becomes part of the "Hill" unit group and it also resumes the timer (unless it already is resumed).

    A second trigger that activates when a unit from the "Hill" group leaves the hill. It removes the triggering unit from the group.

    I've also got another trigger that goes off after an elapsed time of 1 second. It checks to see if the "hill" unit group is empty. If the group is empty, it pauses the timer (unless it already is paused).

    I figured this would be a pretty simple way to code it for now. What I need to do now is loop the third trigger so that it checks the group every second. This way, it can constantly check to make sure the group is not empty. Is there a way to loop triggers?
     
  12. EatMeReturns

    EatMeReturns Happy Mapper Moderator

    Joined:
    Jun 28, 2007
    Messages:
    1,730
    Likes received:
    11
    Trophy points:
    38
    From:
    Albuquerque, New Mexico
    Rather then 1 Elapsed Game Time, make it Periodic Event for your trigger event. Set the time to however often you want it to check, and voila. It will now check every X Seconds if the unit group is empty, pausing the timer accordingly.