- Edited
Hello everyone,
I have been attempting to resolve this issue since this morning without success. In my script, the player is required to click on three different buttons, each initiating a dialogue. So far, there have been no issues with this part. However, when I try to start a new dialogue after all three dialogues have been completed, it doesn't work. My signals seem to be functioning correctly, as I am able to print a test message. The crash occurs only when I add Dialogic.start("intro_sister") instead of print; it then throws an 'Out of bounds get index '-1' (on base: 'Array')' error.
Thank you in advance!
Here is my code:
https://snappify.com/view/545388ec-340d-413c-ba57-6fc903567d74
func _ready():
transition.play("fade_in")
Dialogic.start("intro")
Dialogic.signal_event.connect(check_all_done)
func _on_piano_pressed():
#piano_song.play()
Dialogic.start("intro_piano")
piano_done = true
check_all_done("piano_done")
func _on_parent_picture_pressed():
Dialogic.start("intro_parent")
picture_done = true
check_all_done("picture_done")
func _on_plants_pressed():
Dialogic.start("intro_plants")
plants_done = true
check_all_done("plants_done")
func check_all_done(argument:String):
match argument:
"picture_done":
picture_done = true
"piano_done":
piano_done = true
"plants_done":
plants_done = true
if picture_done and piano_done and plants_done:
Dialogic.start("intro_sister")