This section will show you how to set up audio, like barks, and visual effects, like camera shakes, to create engaging gameplay.
Audio Player Device
You can use the Audio Player device to set use dialog lines from guards. In game development, these are often referred to as barks.
You can find imported audio in "Project folder" > Barks. Click the Play icon to hear the audio file, then drag and drop it onto your island.
Dropping an audio file onto your island will place an Audio Player device, which is hooked up to a Verse device to play a series of customs guard callouts. These callouts react to different events, like spotting the player or taking damage.
Place one Audio Player for every unique piece of audio that you want to play. This tutorial uses 14 different barks, with 14 different Audio Player devices placed.
To set up these devices, customize the following settings:
| Option | Value | Explanation |
|---|---|---|
Volume | 4.0 | This setting can vary depending on your recording. |
Restart Audio when Activated | True | This audio will play from the beginning when activated. |
Play on Hit | False | This device will not play audio when hit by a player. |
Play Location | Instigating Player | Audio will be played based on the instigating player's loacation instead of the device location. |
Enable Volume Attenuation | False | Changes the volume based on the distance from the device or guard set to play it. For this tutorial, the player can hear the audio no matter how far away they are. |
Next, set up the Verse script to handle the logic for triggering the Audio Player devices during the game, then place the Verse device. For this tutorial, the device is named Stronghold Bark Manager.
Paste the following Verse script.
using { /Fortnite.com/Devices }
using { /Fortnite.com/Game }
using { /Fortnite.com/Characters }
using { /Verse.org/Random }
using { /Verse.org/Simulation }
using { /UnrealEngine.com/Temporary/Diagnostics }
using { /UnrealEngine.com/Temporary/SpatialMath }
# Audio bark that can be played on a NPC
audio_npc_bark := class<concrete>:
# Audio device to play barks
This script stores a reference to each Audio Player device and references the Stronghold Game Manager Verse device as a conduit for its references to the Guard Spawners.
Customizable Lights
In addition to getting audio feedback from AI guards, you can also give players visual feedback from the environment.
This tutorial uses two sets of Customizable Light devices around the stronghold. A red light indicates a detected status while an orange light indicates an alerted status.
To set up these devices, customize the following settings:
| Option | Value | Explanation |
|---|---|---|
Initial State | False | Determines the light’s initial state when the device is enabled. |
Light Size | 100.00 | Determines the size, range, and amplitude of the of the light flare. |
Cast Shadows | True | Allows the light to cast shadows. |
Enabled During Phase | Gameplay Only | Lights will only be enabled during the gameplay. |
Light Intensity | 30.0 | Determines the intensity of the light. |
Rhythm Time | x8 | Determines the time multiplier for the Rhythm Preset. |
Dimming Amount | 100.0 | Determines the amount to dim the light when using the channel controls. |
Dimming Time | 0.1 | Determines the dimming transition duration in seconds. |
VFX Creator
This tutorial also uses a VFX Creator device at the top of the base to act as a signal flare for reinforcements when players are first detected. This flare is controlled by the Verse device and will go off along with the corner lights when guards are alerted to make their states visually clear.
To set up these devices, customize the following settings:
| Option | Value | Explanation |
|---|---|---|
Start Effects When Enabled | False | Determines whether the device will execute the effects when enabled. |
Sprite Size | 2.0 | Sets the Effect Sprite initial size. |
Sprite Duration | 5.0 | Sets how much time each sprite will appear. |
Main Color | Red | Sets the main color for the effects. |
Main Color Brightness | 200.0 | Sets the Main Color brightness. |
Sprite Speed | 100.0 | Sets how fast the effects sprites start to move. |
Effect Gravity | 15.0 | Sets how fast the effect sprites can fall. |
Randomness | 100.0 | Determines how random the movement will be and adds variation to size. |
Keep Size | False | Determines whether sprites keep its size or use a custom size that changes over time. |
Effect Generation Amount | 4.0 | Sets how many effect sprites are generated. |
Spawn Zone Shape | Point | Determines the space shape where the sprites initially appear. |
Spawn Zone Size | 0.05 | Sets the size of the spawn shape in tiles. |
Enabled During Phase | Gameplay Only | Determines the game phases during which the device will be enabled. |
Loop | Never | Determines if the effect plays once, loops forever, or by a custom amount of times. |
Radio Device
This tutorial uses two Radio devices, one for high-alert combat music and the other for cautious music.
The tense player music uses: Radio > Music Loops > Music_StW_Low_Combat01_Cue'.
The player-spotted combat music uses the Radio > Music Loops > Music_StW_High_Combat01_Cue'.
Set up a Verse script that you can call Stronghold_Alert_Manager to listen when a guard has detected the player, or when all guards have lost track of the player to alternate between the two states in the stronghold.
Paste the following Verse script.
using { /Verse.org/Simulation }
using { /Verse.org/Simulation/Tags }
using { /Verse.org/Colors }
using { /UnrealEngine.com/Temporary/Diagnostics }
using { /Fortnite.com/Devices }
# tags for customizable lights
alerted_lights_tag := class(tag){}
combat_lights_tag := class(tag){}
# Script that handles music and turn on lights when guards are alerted
stronghold_alert_manager := class(creative_device):
You have now successfully created a stronghold game.