Adding Dialogue Beep SFX
Dia:
"Dialogue voice beep often used as
substitute for voice acting in video games."
:
"Especially in the older titles
and smaller budget productions."
:
"Although not really used in modern titles anymore,
there's many indie games that still use this today."
TL;DR
Play the dialogue beep audio with the DialogueLabel
's character_drawn
signal.
-
Add the dialogue voice beep audio file to your project. In this article, we'll use one of the sound effect from Text/Dialogue Bleeps Pack by dmochas .
-
Add
AudioStreamPlayer
node, attach the beep audio file to it, and reference it asbeep_player
variable. -
Connect the signal
character_drawn
fromDialogueLabel
to method_on_dialogue_label_character_drawn()
. -
On the signal method, play the audio from the
beep_player
usingplay()
. Only if its not already playing.
Code summary
MyScene
├─ Stage
├─ PanelContainer
│ └─ VBoxContainer
│ ├─ Label
│ └─ DialogueLabel
└─ AudioStreamPlayer
extends Control
var dlg : Dialogue # Load/create Dialogue here
@export var stage : Stage
@export var beep_player : AudioStreamPlayer
func _input(event):
if event.is_action_pressed("ui_accept"):
stage.progress()
func _ready():
stage.start(dlg)
func _on_dialogue_label_character_drawn():
if not beep_player.playing:
beep_player.play()
Download
Got any questions? feel free to ask them in the GitHub Discussions!