How do i get custom sound effects when i kill someone?
elimination manager: on elimination → audio player: play
put your sfx in the audio player and change the audio player to your wanted settings (how loud the sfx is, who can hear it, from how far it can be hear, etc.)
how can i have multiple ?
Place multiple audio players and randomize which one plays using code or the rng device.
Hello mate, i am searching for this all day, how do i randomize using rng device?
Make it pick a number 1-3 and make the winning output 2. Bind your sfx players to on rolled high, one on rolled low and one on winning value
thank you, so then you only can have 3 sounds without having to use verse?
No you can do more. For example, you can bound the rng devices on every output, that instead of playing a sound, another rng device triggers, but the possibilities are finite.
I’ve made a some verse code for you that you can also use. Feel free to ask questions about things that are unclear.
using { /Fortnite.com/Devices }
using { /Verse.org/Simulation }
using { /UnrealEngine.com/Temporary/Diagnostics }
using { /Verse.org/Random}
#You must place down the RandomSFXPlayer creative device in your island (Found by going to content drawer -> "YourGame" Content -> Creative Devices, just drag it into your map)
#Connect all the devices in the creative device to the corresponding device on your island
RandomSFXPlayer := class(creative_device):
#Place the elimination manager on your island, you do not have to change any settings in it.
@editable EliminationManager : elimination_manager_device = elimination_manager_device{}
#Add all your audio players (each with a different audio) onto the array in your creative device in your map
#Change the settings of the audioplayers in the device settings to whatever you want (volume, heard by, play location, etc.)
@editable SFXPlayers : []audio_player_device = array{}
OnBegin<override>()<suspends>:void=
EliminationManager.EliminationEvent.Subscribe(PlayerElimination)
PlayerElimination(Agent:?agent):void=
if (MaybeAgent := Agent?):
RandomInt := GetRandomInt(1, 3) #change the '3' to however many sfx you want
if (RandomAudioPlayer := SFXPlayers[RandomInt - 1]):
RandomAudioPlayer.Play(MaybeAgent)
- Select all sounds that u want.
- Right click, Create a single cue
- Then put the cue in a audioplayer.
I think it will play random sound then.