Encounters are an event which is launched with a certain chance in pre-prepared places, in which bots spawn. Most commonly used in POIs to spawn AI when players are near
Before beginning, set LevelGameplay to current
If there is already a GA in your POI, then skip this step.
Find the GA_Base blueprint at: Blueprints/Gameplay/GA_Base.uasset, move into level.
GA must be located in the center of the territory where the Encounter will be created.
Select your GA, in the Details menu, click Add Component and select “SFPSACEncounter”
Don't forget to name the encounter to stay organized!
Select your Encounter in the details menu
Click Add Component and enter “SFPSACSpawner“
A red spawner indicates that one of the required parameters is not configured, or there is a problem with NavMesh.
Is Player Spawner - always False for bot spawners in an encounter.
Character Groups - an array of possible bot variations.
Character Set - a table of bots for spawning (this setting is mandatory).
Optional - If false, then a bot will definitely spawn in this spawner, which is NOT counted in the total number of bots. If true, then a bot from the total number of bots can spawn in this spawner.
Route Actor - a pointer to the path the bot will follow.
Route Start Waypoint - the starting point of the path.
Route Direction - the direction of movement along the path.
Route Chaotic - the bot will choose the next point of the path randomly, rather than sequentially.
AIConfig - AI configuration (this setting is mandatory).
Sense Config Sight - configuring the bot's vision configuration (if left None, the default setting will be used).
Sense Config Hearight - configuring the bot's hearing configuration (if left None, the default setting will be used).
Hearing Volume - a pointer to the blueprint of the bot's hearing area.
Look Around Origin - a vector that can be moved in space, a purple figure, thanks to it you can adjust the angle where the bot will look during spawn (if you just rotate the spawner, the effect will be the same)
Spawn Location Offset - the bot's spawn offset.
Debug Color - the color of the spawner point. If there are many bots involved in different events in one place, it is worth changing their color for better orientation in them.
Route Direction:
0 - the bot goes in a random direction along the path.
1 - always in the direction of increasing waypoint number.
-1 - always in the direction of decreasing waypoint number.
To save time, it is recommended to set up one bot and copy it by moving it while holding L Alt, rather than setting up each one separately. Then change the settings that will be different.
RO paths, or Route Actors, are a set of waypoints placed into the level that tell AI where and how to move when the encounter is triggered
Find the RO_Base blueprint at: Blueprints/Gameplay/RO_Base.uasset, and move it to the level. Remember to name it to stay organized
To create new waypoints, copy it by moving it while holding L Alt. For the best server optimization, use as few waypoints as possible.
RO paths are assigned to AI in the spawner parameters, specifically under Route Actor
When correctly configured, the purple/blue line on the bottom will show approximately where the AI will walk.
Hearing Volume (SFPSAIHearingVolume) - a hearing area that can be assigned to a bot and it will not hear anything that happens outside this area until it sees a player.
Find the C++ class SFPSAIHearingVolume at: C++ Classes/Deadside/Server/AI/SFPSAIHearingVolume, and move it to the level.
Move it to the desired location, and adjust size with the brush tools in the details menu
Finally, assign the volume to AI in the hearing volume parameter of the spawner
Variants - an array of possible combinations
Min Count - the minimum number of bots
Max Count - the maximum number of bots
No Activate Radius - radius that prevents AI from spawning if a player enters. For example, a player entered the game and spawned right in the middle of an encounter.
Respawn Time Min - the minimum time before the encounter is activated after it ends.
Respawn Time Max - the maximum time before the encounter is activated after it ends.
Wait Time - the time before the bots spawn after the player crosses the encounter activation area.
Change - the chance of starting an encounter.
Exclusive - if True, then in the GA to which this encounter belongs, this encounter will be able to spawn regardless of reaching the limit of simultaneously running encounters.
Radius - the radius of the area that must be crossed to activate the encounter.