In this basic tutorial I will explain step by step how to make your own Defence Alliance 2 map. It is required that you know the basics of level design in order to follow this tutorial.
I've already made a simple level, where I plan to have one destroyable objective. I will also place serveral actors in which I let bots defend and make a turret. And finally I will place a defensive turret in my level.
We will begin with the TeamConfig actors. These will determine how many turrets and ammoboxes a team can built.
We have to place two TeamConfig actors, for each team. We have to set the team numbers for each actor, by default they are defenders. So in the first actor we have to change the turret limits and bot behaviour to Defend. In the second one we only have to change the team number to 1.
Team 0 = Defenders
Team 1 = Attackers
Placing our Objective
Now that we have deterimed what team will attack and defend (ps.teams cannot be switched around), we will add our Objective. As I said in the introduction, I have chosen for a destroyable Objective, but it's also possible to add a switch or an area that needs to be reached by the attackers.
By default the static mesh will be a switch when you first place it, I have changed it into an oil tower. When rebuilding our map, i've received an error that our Objective is not on a valid base. This means that the collision circle isn't in touch with the ground. We have to change the PrePivot in order to fix this issue.
When we rebuild our map now, it doesn't give any errors. We now have to set the health of the Objective, I've changed it to a 1000 health.
Finally we can set this Objective as win. This means that when this Objective has been accomplished, the game will end. In every map it is required that you have atleast one Objective that wins the game. We can also set a value for BonusTime. When this Objective has been accomplished, this time will be added to the clock, and will give the attackers more time to get to the following objectives.
Under MUB, Mission Update B.. (I forgot), we can set a message that will be shown to the defenders and attackers when this objective has been accomplished.
When you have multiple Objectives, you have to change the DefensePriority in +GameObjective. The first objective will start with the lowest priority, for instance we have four objectives, then the first objective has DefensePriority 3, the second: 2, etc and then the final Objective has 0.
In the GameObjective tab, we can also set the score that the attacker will receive when he accomplishes this Objective.
And the name of the Objective, which will be shown in the HUD.
Finally we have to set the DefenseScriptt here, which we will talk about next.
We can now also give the Objective an Event. With this event you can trigger a series of other actors, like TriggeredPlayerstarts, so the attackers can spawn at this objective.
We give this Objective the following event: first_objective.
We can now place actors which let defenders stand at. These are called UnrealScriptedSequence. They are already setup, so you only have to place them in the map, and change it's Tag. We gave it the same name as the objective: first_objective, this has to be entered at the GameObjective tab in the properties of the Objective, like we just talked about.
You can also change the time the defender has to stand at this actor and a certain other options, which I won't go into detail in this tutorial.
To let the defending bots built structures, like turrets or ammoboxes. We have to place a builtBeacon somewhere we thing would fit. We first have to get the object name, that is given to the Objective, we want the defending bots to built their turret at. In our case it's called: "da_objective_destroyable0"
After placing our builtBeacon, we then have to type at Objective: "da_objective_destroyable0", and it will automaticly change to "da_objective_destroyable,mylevel.objectivedestroyable0". We can also choose if we want it to built a random structure there. But in our case we will let it at False, and select a turret from the dropdown list.
You can then also set the suggestbuilt, which determines the priority which turret should be built first (0 has most priority) And finally we have to set the team. (Team 0 = Defenders, Team 1 = Attackers)
And finally we can place a turret in our map. You have to select if you want it pre-built at map start, or that a mechanic has to finish building it. Aswell as the team it belongs to has to be set.
Turrets placed in the map by the designer, add up to the turret limit you configured in the TeamConfig actors.
The turret has to be placed slightly above the ground, it will then later spawn the turret base. You have to test the map in order to know if you have placed it at the correct height.
To finish off the map, I have placed some regular playerstarts and both ends and placed serveral pathnodes. You can also work with triggered playerstarts, which you can enable or disable and then can be triggered to be disabled or enabled. This will create the possibilty to spawn the attackers more forward in the map.
Sometimes you want to protect certain area's in your level where nobody is allowed to built turrets. Turrets could block Objectives, or be placed inside buildings, etc.
To prevent this you can place a da_ConstrainedVolume. Inside this volume, nobody is allowed to built turrets.
Because this is an Assault type game, on some places you don't want anyone to jump over walls or railings to get to the following Objectives earlier then intended.
You can here place a blocking volume, where you can set a specific class to block there only. You have to set ClassBlocker to true, and select "da_players_ClassPlayer"