-
-
Notifications
You must be signed in to change notification settings - Fork 19
AudioCueSound
Inherits AudioCue.
An AudioCue intended to play sound effects, voices or graphic interface sounds.
-
play( bool
wait_to_end = false
, Vector2position_2d = Vector2.ZERO
) void🍑 Use this to play this audio cue inside an E.run() (a.k.a. queue of instructions) 🍑
Plays the sound when running inside an E.run(). If
wait_to_end
istrue
the function will pause until the audio clip finishes. You can play the clip from a specificposition_2d
in the scene if the AudioCue has its is_2d property astrue
. Can be yield.# The player character (PC) will say "What is this?" once the audio clip finishes playing. yield(E.run([ 'Player: Lets see what we can find here.', A.sfx_locker_open.play(true), 'Player: What is this?' ]), 'completed')
-
play_now( bool
wait_to_end = false
, Vector2position_2d = Vector2.ZERO
) voidPlays the sound immediately. If
wait_to_end
istrue
the function will pause until the audio clip finishes. You can play the clip from a specificposition_2d
in the scene if the AudioCue has its is_2d property astrue
. Can be yield.func on_room_entered() -> void: A.sfx_door_close.play_now()