Create An Encounter
The encounter manager is used to control all of the combat scenarios in the single-player levels. The encounter manager can create a simple fight or can be used to orchestrate some very complex battles.
This page details the creation of an AI encounter in your map using Encounter Manager.
Set Up an Encounter
Before you start building your encounter, it’s important to set up your editor to easily work in multiple tools. You should open and dock the following editors/tools in separate panes:
- World Editor – You’ll open your map and place entities here.
- Encounter Manager – You’ll script your encounter here.
- World Camera – You’ll view the 3D map here.
- Entity Inspector – You’ll edit the various entities you place in the map here.
For more information on docking editors, see: Layout Customization | Docking
- With a map open in World Editor, add an Encounter Manager entity outside your map: Right-click → New Entity → Encounter → Encounter Manager
DLC1 and DLC2 Encounter Managers include all AI for DOOM Eternal and the respective DLCs.
- Now add a Commit Trigger to your map: Right-click → New Entity → Encounter → Trigger → Commit.
It’s important to use the Encounter Commit Trigger and not the standard trigger used in other parts of the map.
- Place the Commit Trigger in the chosen spot in your map. Move and resize the commit trigger as needed to cover the space the player will walk through to trigger the encounter.
For more information, see: Brush Geometry & Block Out | Keyboard commands for brushes
- Connect the Commit Trigger to the Encounter Manager:
- Select both the Commit Trigger entity and the Encounter Manager entity.
- Press Ctrl + J to connect the two.
- Alternatively, select the Encounter Manager, open Entity Inspector, and set the Commit Trigger parameter to point to your Commit Trigger brush.
- Add one or more Spawn Target(s) to the map: Right-click → New Entity → Target → Spawn.
- Move the Spawn Target(s) to the desired place(s) in your map.
- Create a Spawn Group:
- Right-click → New Entity → Encounter → Spawn Group → [Zone or Cylinder].
- Drag the Spawn Group entity to encompass your Spawn Targets.
- Connect the Spawn Group to the Encounter Manager:
- Select both the Spawn Group entity and the Encounter Manager entity.
- Press Ctrl + J to connect the two.
- Alternatively, select the Encounter Manager, open Entity Inspector, and set the Spawn Group parameter to point to your Spawn Group cylinder or zone.
- Add an AI & Spawn Parent outside the map:
- Right-click → New Entity → AI → [CHOOSE AN AI].
- If you want to spawn more than one type of AI, add each one outside the map.
- Right-click → New Entity → Encounter → Spawn Group → Parent.
- Right-click → New Entity → AI → [CHOOSE AN AI].
- Add the AI to the Spawn Parent target list:
- Select the Spawn Parent and then the AI (in that order).
- Select all AI if you have more than one type. - Press Ctrl + K to add the AI to the Spawn Parent target list.
You can also keep things organized by adding additional Spawn Parent entities and targeting one AI type per Spawn parent.
- Connect the Spawn Parent to the Spawn Group:
- Select both the Spawn Group and the Spawn Parent.
- Press Ctrl + J to connect the two.
- A dialog box will pop up.
- Select ONLY link Spawn Parent (deselect: link spawners).
You can have multiple Spawn Parents linked to one Spawn Group.
Alternatively, select the Spawn Group, open Entity Inspector, and set the Spawn Parent parameter to point to your Spawn Parent entity.
Script an Encounter in Encounter Manager
Before you start scripting your encounter, it’s important to set up your editor to easily work in multiple tools. You should open and dock the following editors/tools in separate panes:
- World Editor – You’ll open your map and place entities here.
- Encounter Manager – You’ll script your encounter here.
- World Camera – You’ll view the 3D map here.
- Entity Inspector – You’ll edit the various entities you place in the map here.
For more information on docking editors, see: Layout Customization | Docking
- Begin with setup steps (above). Your map must include:
- an Encounter Manager
- a Commit Trigger
- a Spawner (or set of Spawners)
- a Spawn Group
- a Spawn Parent
- an AI (or multiple AI) governed by the Spawn Parent
- With your map open in World Editor, select your Encounter Manager entity and open the Encounter Manager tool.
- Drag commands from the Commands section to the Script section to build your encounter script.
- Click on a command in the Script section to open its properties (in the Properties section). Fill in the properties of the command:
- Set times
- Set percentages
- Set quantities
- Point to encounter entities in your map
- Etc.
- Continue adding commands to fill out your script.
- Save and rebuild your map, selecting the Rebuild Collision + Navigation option.
- Test your encounter in Engine.