diff --git a/src/scene-scripts/dialogue-system/dialog_bubble.cs b/src/scene-scripts/dialogue-system/dialog_bubble.cs index 6bc8ccf..18ec166 100644 --- a/src/scene-scripts/dialogue-system/dialog_bubble.cs +++ b/src/scene-scripts/dialogue-system/dialog_bubble.cs @@ -27,7 +27,7 @@ public partial class dialog_bubble : CanvasLayer { dlgLines = parsedDlg.AsGodotDictionary()[key].AsGodotArray(); if (dlgLines.VariantType == Variant.Type.Array) - dlgLines = dlgLines.AsGodotArray()[GD.RandRange(0, dlgLines.AsGodotArray().Count)]; + dlgLines = dlgLines.AsGodotArray()[GD.RandRange(0, dlgLines.AsGodotArray().Count - 1)]; } public void CloseDialog() @@ -60,8 +60,7 @@ public partial class dialog_bubble : CanvasLayer GetNode("box/panel_container").Visible = true; } } - if (dlgLines.AsGodotArray()[dlgPointer].VariantType != Variant.Type.Dictionary) - dlgPointer++; + dlgPointer++; } if (richText.VisibleCharacters < Regex.Replace(richText.Text, @"\[[^]]+\]", "").Length && GetNode("typewriter_timer").IsStopped()) {