Starcraft 2 Galaxy Map Editor - Create an Attacking Building



This tutorial shows how to create an attacking building in the Starcraft 2 Galaxy Editor.  In this example we will create a Deadly Supply Depot: a Supply Depot with a Photon Cannon attack.  This requires editing 2-3 different data types for the Supply Depot: the Unit, the Actor,and possibly the Weapon.

To get started create a new custom map and fire up the Data Editor.

Unit

1) Select Data Type: Units and find the Supply Depot unit.  You might see several Supply Depot Units with different Sources.  Pick any one, they are the same.

2) Right click the Supply Depot and click Duplicate Unit... Leave Supply Depot checked and don't check anything else.  This will tell our Deadly Supply Depot  to share all of these "things" with the existing supply depot.  We'll end up duplicating a few things ourselves later, but leaving the boxes unchecked prevents the creation of a lot of unneeded junk.  Click OK.

3) A Supply Depot Copy unit has been created.  Double click it and change the name to Deadly Supply Depot.  Hit the Suggest button to set the ID, then click OK.

4) We need to give our Supply Depot the ability to attack.  On the Ability page create a new ability, then set it to attack.

5) Now the Supply Depot has the Attack ability, but it doesn't have the attack command available.  Add a new command to the top left corner of the command card and set it to use the attack button.  Now set the following:

Command Type:   Ability Command
Requirements:   (None)
Ability:   Attack
Ability Command:   Attack

6) We'll also need to set a weapon for our Deadly Supply Depot.  Create a new weapon and set the weapon value to Phase Cannon - Photon Cannon.  You can leave Turret set to (None) for now.  I'll explain this after we set up the actor.

Actor

Now we must create an actor for Deadly Supply Depot.  This will allow us to view the Deadly Supply Depot and actually place it on the map.

9) Select Data Type: Models, then find the Supply Depot, duplicate, and rename as before.

10) Most importantly we need to associate this actor with our Deadly Supply Depot.  At the very top of the options you'll see the Unit Name field under Token.  Change the value from Supply Depot to Deadly Supply Depot.

11) Lastly select the Art tab.  Change Models to the corresponding Supply Depot Models.

What's Left?

At this point we have a supply depot that technically has the ability to attack, but if you try to use it to attack a unit you'll find that you get the error : "Can't turn toward target".  We must be facing the target to use our weapon, but our Supply Depot can't move!  There are 2 options here.  1) add a turret to the building, which will allow our weapon to turn, or 2) Increase the range of the weapon so that it can hit in all directions, removing our need to turn.  The turret is the easier solution, but I'll explain how to do both.

Adding a Turret

Go back to the Units section and scroll down on Weapons under the combat tab,where we added our weapon previously.  Select a turret for our weapon: Photon Cannon is fine.  The turret won't actually be visible, it doesn't have a model.  The only thing the turret does is allow the weapon to rotate.  You can tweak it to adjust how fast it rotates and what range it has, but for our basic purposes this is unncessary.

Increasing Weapon Range

There's no really any reason I can think of at this point in time not to use a turret, but I'll explain this method for the sake of completeness.

1) Find the Phase Cannon - Photon Cannon under Weapons and make a duplicate, leave everything unchecked.  Rename it to Wide Range Cannon.

2) Under the stats tab set Arc to 360.0.  This will allow the Cannon to fire in any direction.

3) Go back to the Units tab and assign the Wide Range Cannon to the Deadly Supply Depot, no turret required.

And that's all there is to it.  Enjoy!

Comments

  1. You help me a little but it help so I know to create a unit with a attack.

    ReplyDelete
  2. I'm trying to use this as a guide to what i am trying to make but however I am failing.

    *It seems when dealing with the sc2 editor I feel like a really stupid person*

    Anyways, I am trying to make a Nuclear Silo using the ghost academy for fun.

    Simple put,
    Ghost Academy - Structure
    Builds Nukes - Ability
    Launches The Nukes - Ability
    -----------------------
    Able to Target Anywhere on the map - 256x256 or greater map.

    If you could email how to create this would be most helpful. Ghosteyez9@gmail.com

    ReplyDelete

Post a Comment

Popular posts from this blog

Terminate Scripted Minicom Session

What Twitter Tells Us

CodinGame: Building an AI to play (and win) at "Penguins"