Verse Library verse

02 Fragment

Prevents rapid NPC audio replays by tracking play times and enforcing cooldown intervals.

verse-library/fortnite-ai-voiceline-manager/02-fragment.verse

# Example snippet for the hint
LastPlayedTime:float = 0.0

OnTriggered := func():
    CurrentTime := CurrentTime()
    if (CurrentTime - LastPlayedTime) > CooldownTime:
        Sound.Play()
        LastPlayedTime = CurrentTime

Comments

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