Skip to content

Commit 12d9451

Browse files
KvaGramKvaGramJowan-Spooner
authored
Text sped 0 special case (#1224)
* Add start and stop logic to CharacterVoice.gd also fixed a naming error in dialog_node * Add some lines of code I forgot to save before committing it happens. And it is always a shame when it does. * implement start_time and stop_time in audiopicker The changes to the preview feature works as expected * Add collapsable secund row to audiopicker Known issue: conflicts with EventPart_VoiceEditor.gd The labels column does not change size to match the resizable audiopicker * Merge Label and Voices containers into a grid container This has solved the issue from the previus commit. This is however a hacky fix, and may have unforseen consequences. * Change the collapse icons * First UI test * Second UI improvments For now the Audio-Region section will be disabled for Audio Event and Background Music event. * Just added a tooltip * New AudioPicker layout/design Was trying to make it clearer what belongs together. Hope it works. * Fix embarresing typo I had a feeling something were wrong, now I fixed it. * Updated Changelog Apparently there wasn't even a note about the Voice Line System... ;-/ * In in a nw=v feature With this, the text event will skip to the next, the moment the voiceacting is complete. It is a hack, and needs to be better refined to fit in base code, but it works. Tests work as expected. When tested on a line without voice, it defaults to a 0 secund skip * Add a special case for text speed 0 In a text-speed of 0, godot's timer logic breaks down. A start(0) call does not set the time, causing unexxpected pauses. Bypassing that with a special case that bypasses the timer skips vital signal connections. This caused the event to stall and get stuck. As a compromise, this patch forces the timer to run a short cycle at the start of the text reveal in order to allow the signals to connect correctly. This only occours when the text speed is set to 0. Co-authored-by: KvaGram <0kvakk@gmailcom> Co-authored-by: Jowan-Spooner <[email protected]>
1 parent d7c69eb commit 12d9451

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

addons/dialogic/Events/Text/Display_DialogText.gd

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,10 @@ func reveal_text(_text:String) -> void:
4949
elif Align == ALIGNMENT.RIGHT:
5050
text = '[right]'+text
5151
visible_characters = 0
52-
timer.start(speed)
52+
if speed <= 0:
53+
timer.start(0.01)
54+
else:
55+
timer.start(speed)
5356
emit_signal('started_revealing_text')
5457

5558
# called by the timer -> reveals more text
@@ -59,7 +62,7 @@ func continue_reveal() -> void:
5962
emit_signal("continued_revealing_text", text[visible_characters-1])
6063
execute_effects()
6164
if timer.is_stopped():
62-
if speed == 0:
65+
if speed <= 0:
6366
continue_reveal()
6467
else:
6568
timer.start(speed)

0 commit comments

Comments
 (0)