Verse Library verse

01 Audio Player Device

Manages NPC audio barks with configurable delays, cooldowns, and playback control.

extracted-snippets/documentation/en-us/uefn/verse-stronghold-template-5-add-effects-in-unreal-editor-for-fortnite/01-audio-player-device.verse

# Source URL: https://dev.epicgames.com/documentation/en-us/uefn/verse-stronghold-template-5-add-effects-in-unreal-editor-for-fortnite
# Local doc:  epic-docs/documentation/en-us/uefn/verse-stronghold-template-5-add-effects-in-unreal-editor-for-fortnite.md
# Section:    Audio Player Device
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
    @editable
    BarkDevice:audio_player_device := audio_player_device{}
    # Option to allow NPCs to repeat the bark
    @editable
    CanRepeat:logic = true
    # Delay between the event and the beginning of the bark
    @editable
    Delay:float = 0.0
    # Delay before repeating this bark
    @editable
    Cooldown:float = 5.0
    # Bark name for logging
    @editable
    BarkID:string = "Missing ID"
    # Is the cooldown timer elapsed
    var<private> IsInCooldown:logic = false
    # Event to stop the bark

Sign in free to read the full source 🌴

This Verse Library file is members-only. Create a free account to view the complete source and download the .verse file.

Sign in with Discord

Comments

    Sign in to vote, comment, or suggest an edit. Sign in