Creating a destructible objective

From Mod Wiki
An Advanced Map
1. Introduction and goals of the tutorial
2. Necessary map declarations
3. Caulk hull
4. Creating a simple terrain
5. Adding an atmosphere
6. Adding player spawns
7. Adding base structures
8. Adding base vehicles
9. Creating a constructible Bridge
10. Adding an MCP escort objective
11. Adding a Shield Generator hack objective
12. Creating a destructible objective
13. Adding Objective spawns and vehicles
14. Info Objectives
15. Deployzones
16. Playzones
17. Masks
18. Barebones Map script
19. Creating a command map
20. Levelshot

Destructible objectives are "gameplay/destructible/<teamname>" entities and are accompanied by two triggers, a trigger_noplant and a gameplay_destructible_trigger.

Destructible objective

Add the objective by creating a gameplay/destructible/strogg entity and add the key pair modelmodels/mapobjects/strogg/stroyent_barrel_holder.lwo. This crate of stroyent will be our final objective.

Required Keys

The following keys should be used on our final objective:

  • dmg_splash_damage damage_objective_explosion
The damage dealt when the objective is destroyed.
  • object_name maps/valley/strogg_device
The name of the objective in game.
  • objective_index 3
Since this is the fourth objective, this should be 3. The first objective is always 0.
  • snd_defend_gdf sounds/vo/gdf/highcommand/maps/valley/contaminator/defendexpl
Sound shader played to GDF when a charge is planted. Played after snd_planted_strogg.
  • snd_defend_strogg sounds/vo/strogg/nexus/maps/valley/contaminator/disarm
Sound shader played to Strogg when a charge is planted. Played after snd_planted_gdf.
  • snd_destroyed_gdf sounds/vo/gdf/highcommand/maps/valley/gdfwin
Sound shader played to GDF when the objective is destroyed.
  • snd_destroyed_strogg sounds/vo/strogg/nexus/maps/valley/strogglose
Sound shader played to Strogg when the objective is destroyed.
  • snd_disarmed_gdf sounds/vo/gdf/highcommand/maps/valley/contaminator/disarmed
Sound shader played to GDF when a charge is disarmed.
  • snd_disarmed_strogg sounds/vo/strogg/nexus/maps/valley/contaminator/disarmed
Sound shader played to Strogg when a charge is disarmed.
  • snd_intro_gdf sounds/vo/gdf/highcommand/maps/valley/contaminator/destroy/long
Sound shader played to GDF at the objective start.
  • snd_intro_strogg sounds/vo/strogg/nexus/maps/valley/contaminator/defend/long
Sound shader played to Strogg at the objective start.
  • snd_planted_gdf sounds/vo/gdf/highcommand/maps/valley/contaminator/planted
Sound shader played to GDF when a charge is planted.
  • snd_planted_strogg sounds/vo/strogg/nexus/maps/valley/contaminator/planted
Sound shader played to Strogg when a charge is planted.
  • snd_reminder_gdf sounds/vo/gdf/highcommand/maps/valley/contaminator/destroy
Sound shader played to GDF reminding them about the objective.
  • snd_reminder_strogg sounds/vo/strogg/nexus/maps/valley/contaminator/defend
Sound shader played to Strogg reminding them about the objective.
  • task_name maps/valley/task_device
The task name. Used when this is your mission.
  • model models/mapobjects/strogg/stroyent_barrel_holder.lwo
Display model in game.
  • team strogg
Team which the objective belongs to.


Triggers surrounding the objective. Notice the inner "gameplay_destructible_trigger" conforms close to the objective so a charge cannot planted too far away

Triggers

There are two triggers present for a typical destructible objective:

trigger_noplant

A trigger_noplant should surround the objective. This is used to define an area where a particular team is not allowed to plant charges, ie the defending team. This was added to stop the defending team planting charges at the objective, causing confusion for defending engineers/constructors.

Required Keys

  • team strogg
This means the strogg are not allowed to plant here.

gameplay_destructible_trigger

A gameplay_destructible_trigger should also surround the objective. This defines where the charge must be planted to be considered valid. Usually much more conforming to the objective model than the trigger no plant.

Required Keys

  • target strogg_device
The name of the objective.

Worldspawn keys

The final objective requires a worldspawn key:

  • "script_strogg_device" strogg_device.

See Also