Verse Library verse

01 Fragment

Loops indefinitely to wait for trigger events and play associated sound effects.

verse-library/verse-sound-triggered-sfx/01-fragment.verse

# A Trigger Device fires its TriggeredEvent when an agent steps into its zone.
# Await() it inside a loop and you have a clean "when a player enters, do X"
# hook — here, play a one-shot sound effect. The event hands you a ?agent
# (the player who stepped in), which you can pass to a per-player Play.
loop:
    MaybeAgent := EntryPad.TriggeredEvent.Await()
    StingerSfx.Play()

Comments

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