Creating a campaign

Discussion in 'StarCraft 2 Maps, Replays, Modding' started by bane336, Sep 1, 2010.

Creating a campaign

  1. bane336

    bane336 New Member

    Joined:
    Sep 1, 2010
    Messages:
    35
    Likes received:
    0
    Trophy points:
    0
    So I am creating a campaign and I have actually figured most of it out already. There are more or less 2 things that I can not figure out. The first is that I want to have zerglings start the map burrowed and when a player comes accross them they unburrow and attack. I have pretty much tried everything that I can think of but can not make that work. :confused: Also the other thing I was looking for is maybe a program or something to create voice files for my campaign. I was looking for something along the lines of creating voices like Kerrigan and Jim Raynor.

    Any help would be greatly appreciated.
     
    Last edited: Sep 1, 2010
  2. EatMeReturns

    EatMeReturns Happy Mapper Moderator

    Joined:
    Jun 28, 2007
    Messages:
    1,730
    Likes received:
    11
    Trophy points:
    38
    From:
    Albuquerque, New Mexico
    Place burrowed zergling on your map at the location you want them, then create a region at this location. Create a trigger with the event Any Unit Enters Region. Set the Region to your region over the burrowed zergling. Create a condition that the Triggering Player equals the player number that you want to set off the zergling. If you have more than one player to set them off, create an Or condition and duplicate the triggering player condition for each player, changing the value accordingly. For your actions, create unit group of unit type Zergling located in your region, then pick each unit in this new unit group. Order each picked unit to unburrow. If you need any step-by-step instructions for this, I can give them to you. But it would be best if you figured it out on your own.
     
  3. bane336

    bane336 New Member

    Joined:
    Sep 1, 2010
    Messages:
    35
    Likes received:
    0
    Trophy points:
    0
    Okay this is bugging me. I have done what you said and the units start burrowed but they do not trigger and unburrow. This is the code I have though it is a little different then what you said.

    Attack
    Events
    Unit - Any Unit Enters Region 002
    Local Variables
    Conditions
    (Owner of Kerrigan [32.04, 8.78]) == 1
    Actions
    Region - Attach Region 002 to Zergling (Burrowed) [42.87, 24.07] with offset (Point(0.0, 0.0))
    Unit Group - Add (Unit attached to Region 002) to Attack
    Unit Group - Pick each unit in Allies and do (Actions)
    Actions
    Unit - Order all units in Attack to (Zergling - Unburrow) (Replace Existing Orders)
    Trigger - Turn (Current trigger) Off
     
  4. Kimera757

    Kimera757 New Member

    Joined:
    Feb 23, 2008
    Messages:
    1,035
    Likes received:
    3
    Trophy points:
    0
    Have you given their player the burrow upgrade? Maybe they can't unburrow without it.
     
  5. bane336

    bane336 New Member

    Joined:
    Sep 1, 2010
    Messages:
    35
    Likes received:
    0
    Trophy points:
    0
    Yes gave the comp which is all player 2

    Attack
    Events
    Unit - Any Unit Enters Region 002
    Local Variables
    Conditions
    (Owner of Kerrigan [32.04, 8.78]) == 1
    Actions
    Region - Attach Region 002 to Zergling (Burrowed) [42.87, 24.07] with offset (Point(0.0, 0.0))
    Unit Group - Add (Unit attached to Region 002) to Attack
    Unit Group - Pick each unit in Allies and do (Actions)
    Actions
    Unit - Order all units in Attack to (Zergling - Unburrow) (Replace Existing Orders)
    Trigger - Turn (Current trigger) Off
     
  6. bane336

    bane336 New Member

    Joined:
    Sep 1, 2010
    Messages:
    35
    Likes received:
    0
    Trophy points:
    0
    Actually I was able to create something similar to what I am looking for but using the following code but is clumps all of the units together.


    Events
    Unit - Any Unit Enters Region 006
    Local Variables
    Second ambush = (Empty unit group) <Unit Group>
    Conditions
    Actions
    Unit - Create 4 Zergling for player 2 at Point 003 using default facing (No Options)
    Unit - Create 1 Zergling for player 2 at Point 002 using default facing (Ignore Placement)
    Unit Group - Add (Last created unit) to Second ambush
    Unit - Create 1 Zergling for player 2 at Point 002 using default facing (Ignore Placement)
    Unit Group - Add (Last created unit) to Second ambush
    Unit - Create 1 Zergling for player 2 at Point 002 using default facing (Ignore Placement)
    Unit Group - Add (Last created unit) to Second ambush
    Unit - Create 1 Zergling for player 2 at Point 002 using default facing (Ignore Placement)
    Unit Group - Add (Last created unit) to Second ambush
    Unit - Create 1 Hydralisk for player 2 at Point 003 using default facing (No Options)
    Unit Group - Add (Last created unit) to Second ambush
    Unit - Order all units in Second ambush to (Zergling - Unburrow) (Replace Existing Orders)
    Trigger - Turn (Current trigger) Off
     
  7. EatMeReturns

    EatMeReturns Happy Mapper Moderator

    Joined:
    Jun 28, 2007
    Messages:
    1,730
    Likes received:
    11
    Trophy points:
    38
    From:
    Albuquerque, New Mexico
    I don't have time now, but I will show you what was wrong with your first trigger after soccer practice. About 3 hours.
     
  8. bane336

    bane336 New Member

    Joined:
    Sep 1, 2010
    Messages:
    35
    Likes received:
    0
    Trophy points:
    0
    Now I have another quick question. When placing a region on the map over units are those units automatically assigned to that region or do you have to attach the units to the region like you have to do for a unit group?
     
  9. EatMeReturns

    EatMeReturns Happy Mapper Moderator

    Joined:
    Jun 28, 2007
    Messages:
    1,730
    Likes received:
    11
    Trophy points:
    38
    From:
    Albuquerque, New Mexico
    You do not ever have to attach units to a region.

    <> - Attack
    Events
    Unit - Any Unit Enters Region 002
    Local Variables
    Conditions
    (Owner of Triggering Unit) == 1
    (Unit type of (Triggering unit)) == Kerrigan [IF YOU WANT ONLY KERRIGAN TO TRIGGER THE UNBURROW]
    Actions
    Unit - Order all units in (Zergling (Burrowed) units in (Entire map) owned by player PLAYER IN COMMAND OF ZERGLINGS matching Excluded: Missile, Dead, Hidden, with at most Any Amount) to (Zergling - Unburrow) (Replace Existing Orders)
     
  10. bane336

    bane336 New Member

    Joined:
    Sep 1, 2010
    Messages:
    35
    Likes received:
    0
    Trophy points:
    0
    Okay I changed all of the code to what you suggested and placed the units Zergling (Burrowed) within the region on the map. Now when I go and test the map and view the area with entering the region I see all of the zerglings just standing there not burrowed. I do not have to give an order to have them burrow even though it is created as a burrowed unit do I?
     
  11. EatMeReturns

    EatMeReturns Happy Mapper Moderator

    Joined:
    Jun 28, 2007
    Messages:
    1,730
    Likes received:
    11
    Trophy points:
    38
    From:
    Albuquerque, New Mexico
    Hmmm. Go ahead and try ordering them to burrow in the map initialization.
     
  12. bane336

    bane336 New Member

    Joined:
    Sep 1, 2010
    Messages:
    35
    Likes received:
    0
    Trophy points:
    0
    The Zerglings do not want to cooperate at all. Okay so I have the burrow command in the map init and the trigger for region 2. Though still when I test the map the zerglings that should be burrowed are just standing there. I have a start location for player 2 and everything seems like it should be. Now in the map init do I have to init like melee or AI because at the moment I do not have any of that.
     
  13. EatMeReturns

    EatMeReturns Happy Mapper Moderator

    Joined:
    Jun 28, 2007
    Messages:
    1,730
    Likes received:
    11
    Trophy points:
    38
    From:
    Albuquerque, New Mexico
    No you do not need any other initializations. Double check your code. Make sure the correct conditions are set for the unburrow command. Perhaps give yourself vision over the zerglings to see if they start out burrowed or not. Also, try with just regular zergling rather than zergling (burrowed), changing your triggers accordingly.
     
  14. bane336

    bane336 New Member

    Joined:
    Sep 1, 2010
    Messages:
    35
    Likes received:
    0
    Trophy points:
    0
    Well getting somewhere now. I change all of the code to have them select zergling unburrowed unit. Added a revealer to the region. All the zerglings in the region burrowed in map init but now when I enter that region they do not unburrow. I am checking through all of my settings again and using the debug too now.
     
  15. EatMeReturns

    EatMeReturns Happy Mapper Moderator

    Joined:
    Jun 28, 2007
    Messages:
    1,730
    Likes received:
    11
    Trophy points:
    38
    From:
    Albuquerque, New Mexico
    Ok. Double check you have the correct player and unit set up to enter the region.
     
  16. bane336

    bane336 New Member

    Joined:
    Sep 1, 2010
    Messages:
    35
    Likes received:
    0
    Trophy points:
    0
    Okay after tons of checking and rechecking I finally got it to work. I notices several things that I want to share since it took me soo long to get this working. First in the map init I had to place the following code to get the zerglings in region 2 to burrow on init:
    AI - Start the campaign AI for player 2
    Tech Tree - Disable tech tree requirements for player 2
    Tech Tree - Allow the Zergling - Unburrow ability for player 2
    Tech Tree - Allow the Zergling - Burrow ability for player 2
    Unit - Order all units in (Zergling units in Region 002 owned by player 2 matching Excluded: Missile, Dead, Hidden, with at most Any Amount) to (Zergling - Burrow) (Replace Existing Orders)

    Now I know that seems silly but I checked and rechecked and the AI would not burrow unless the tech and start AI were there. Now for the actual attack itself what I had to do is the following:
    AI - Start the campaign AI for player 2
    Tech Tree - Disable tech tree requirements for player 2
    Tech Tree - Allow the Zergling - Unburrow ability for player 2
    Tech Tree - Allow the Zergling - Burrow ability for player 2
    Unit - Order all units in (Zergling units in Region 002 owned by player 2 matching Excluded: Missile, Dead, Hidden, with at most Any Amount) to (Zergling - Burrow) (Replace Existing Orders)

    Notice that I changed the unit it is calling to one that is already burrowed. That combo is the only one that actually performed the functions.

    Also a HUGE thank you to EatMeReturns for his help and quick responses!
     
    Last edited: Sep 1, 2010
  17. EatMeReturns

    EatMeReturns Happy Mapper Moderator

    Joined:
    Jun 28, 2007
    Messages:
    1,730
    Likes received:
    11
    Trophy points:
    38
    From:
    Albuquerque, New Mexico
    There is no reason the tech tree requirements are in there, and i do not understand why you had to enable campaign AI.
     
  18. bane336

    bane336 New Member

    Joined:
    Sep 1, 2010
    Messages:
    35
    Likes received:
    0
    Trophy points:
    0
    If I did not add those the zergling units that were in the regions would not burrow with just the issue to group action.
     
  19. EatMeReturns

    EatMeReturns Happy Mapper Moderator

    Joined:
    Jun 28, 2007
    Messages:
    1,730
    Likes received:
    11
    Trophy points:
    38
    From:
    Albuquerque, New Mexico
    Simply disabling tech tree requirements should have done the trick.

    EDIT: OH YA YOU HAVE TO RESEARCH BURROW BEFORE YOU CAN USE IT! DERP!

    EDIT2: I should have told you to remove the research requirement for the burrow ability.
     
  20. bane336

    bane336 New Member

    Joined:
    Sep 1, 2010
    Messages:
    35
    Likes received:
    0
    Trophy points:
    0
    Its all good. At least this is an easy way to use for future maps without really doing anything but copy and paste. A huge thanks again for your help.