Making a Defense Map:
Note: This tutorial assumes you've read the following tutorials and have atleast a basic knowledge of StarEdit and triggers.:
http://www.staredit.net/index.php?tutorial=116I. Why do people want to play this map?
The first thing to remember when making a defense map, is that there are hundreds of them out there. Why should people play YOURS? Try to have a unique feature that draws people to play your map. Some examples are:
Pressure D (Team vs. Team Defense)
Mario Hat Defense (Mining minerals, instead of earning them through kills)
Crystallic Cannon Defense (Unique gameplay).
Unique twists to defense maps make them fun to play.
II. Starting off.
The materials needed to make a defense map are as follows:
1. A general idea of what you are going to do. (IMPORTANT)
2. An editor such as StarEdit, or
SCXE3.
StarForge is recomended for square terrain. (Optional).
Most defense maps involve stopping groups of units from reaching the end of a path. Draw out the path you want the units to follow on a piece of paper. Straight lines are recomended, as they are easier to trigger.
Once you have your path(s) drawn out, its time to make them on your map. When making your paths, make sure that they are clearly defined. Make sure to clearly define the areas where units spawn and the area where the units are moving to.
Here are some examples of unit paths:
[attachmentid=7277]
A simple trigger like this is used to move the units:
Trigger |
Players: |
¤ Runners |
Conditions: |
¤ Switch "Level One Start" is Set |
Actions: |
¤ Create 10 Reavers at location "Spawn"[/a]
|
¤ Issue order to all any unit owned by Runners at 'Spawn' move to "End" |
These units will move to the location you specified, and then stop. Great, the units move! Now what?
Now its time to remove them. If those units get to the end, the player loses. So, lets make that trigger.
Make a trigger like this to set the defeat conditions:
Trigger |
Players: |
¤ Defenders |
Conditions: |
¤ Runners bring at least 1 any unit to location "End" |
Actions: |
¤ End scenario in defeat for current player. |
Now the players will lose when those units get to the end of the map.
III. Providing the players with a defense.
Well, the players aren't going to have much fun if they can't defend! How will they defend against these units? There are 2 simple options:
1. Static Defenses (buildings)
Some defense maps use buildings to defend against enemy units. If you are going to do this, make sure you do the following:
a) Edit the properties of the building (Scenarios->Unit and Hero Settings) so that it doesn't take too long to build and it doesn't cost too much for the player.
b) Provide the player with a building unit (Probe, SCV or Drone.) Remember, building a Sunken Colony or Spore Colony requires Creep and a Creep Colony. One way to provide Creep for a player is to pre-place Creep Colonies on the map. MAKE SURE TO EDIT THE CREEP COLONY STATS! Don't forget, Drones sacrfice themselves to make buildings, make a trigger to respawn the Drones for the player.
c) Make sure the terrain is buildable. Terrains like Rusty Pit and Solar Array for example are not buildable.
2. Unit Defenses
Other defense maps use units you can buy. You can do this by making an area where players buy units by stepping on Beacons, or they can be built from buildings. If they are built from buildings, don't forget to edit the time it takes to build the unit. Also make sure you place the prerequisites on the map. Example: Hydralisks require a Hydralisk Den to build.
Also don't forget to give the players enough Supply to build those units. For Zerg this means Overlords, Protoss need Pylons, and Terrans need Supply Depots.
IV. Buying Units
How do these players GET their units? You have to make triggers for them.
If you want the players to get units by stepping on a Beacon, make some triggers like this.
Trigger |
Players: |
¤ Defenders |
Conditions: |
¤ Current Player accumulates at least 5 minerals
|
¤ Current Player brings at least 1 Civillian to location "Buy Marine" |
Actions: |
¤ Move all Civillian owned by current player from "Buy Marine" to "Shopping Center"
|
¤ Create 1 Marine for Current Player at "Unit Spawn"
|
¤ Modify resources for current player: subtract 5 minerals.
|
¤ Preserve Trigger |
And if you want the players to build their units, place the unit producing buildings off to the side. Create a location around them, and make a trigger like this.
Trigger |
Players: |
¤ Defenders |
Conditions: |
¤ Current player brings at least 1 Men to location "Unit Making Buildings" |
Actions: |
¤ Move all men from location "Unit Making Buildings" to "Unit Spawn"
|
¤ Preserve Trigger |
If you are making a more advanced defense map with multiple unit spawns for the players, it is best to spawn the units in one area, and then 'sort' them.
Trigger |
Players: |
¤ Defenders |
Conditions: |
¤ Current Player accumulates at least 5 minerals
|
¤ Current Player brings at least 1 Civillian to location "Buy Marine" |
Actions: |
¤ Move all Civillian owned by current player from "Buy Marine" to "Shopping Center"
|
¤ Create 1 Marine for Current Player at "Unit Spawn"
|
¤ Modify resources for current player: subtract 5 minerals.
|
¤ Preserve Trigger |
Make a trigger like this for each player:
Trigger |
Players: |
¤ Player 1 |
Conditions: |
¤ Current Player brings at least 1 any unit to location "Unit Spawn" |
Actions: |
¤ Move all any unit from "Unit Spawn" to "Player 1 Spawn"
|
¤ Preserve Trigger |
See the example map for more information on unit buying.
V. Earning Cash.
It is recommended you read this tutorial for ways to earn cash for kills:
http://www.staredit.net/index.php?tutorial=81Here are two simple ways to reward players for kills:
Trigger |
Players: |
¤ Defenders |
Conditions: |
¤ Current player's Kill score is at least 1 |
Actions: |
¤ Modify score for current player: Set Kills to 0
|
¤ Modify resources for current player: Add 2 minerals
|
¤ Preserve Trigger |
You may notice that this way has some flaws. For example, what happens if the player kills 2 units at the same time? They'd only get 2 minerals instead of 4!
Here is another simple way to do Kills to Cash:
Trigger |
Players: |
¤ Defenders |
Conditions: |
¤ Current player kills 10 any unit. |
Actions: |
¤ Modify resources for current player: Add 10 minerals |
The problem with this method is that you have to make one of these for each interval. 10 units, 20 units, etc. Also, there will be a point where the player can no longer recieve minerals. (Ex, 510 kills, and your triggers only go up to 500.)
For other methods, see the tutorials:
http://www.staredit.net/index.php?tutorial=81http://www.staredit.net/index.php?tutorial=25VI. Sweet, sweet Victory
How do the players win? They win once the last level is complete.
Here's a simple trigger for victory:
Trigger |
Players: |
¤ Defenders |
Conditions: |
¤ Switch "Level 25" is set
|
¤ Runners command at most 0 any unit. |
Actions: |
¤ End scenario in victory for current player. |
Congratulations, you're on your way to making a Defense map.
NOTE: What am I missing (besides the example map, I know.)