Godot Version
Godot 4.3
Question
I’m working on a game with a dialogue system that allows players to switch between conversations with different characters. Saving the timeline works just fine but when I reopen the conversation, nothing happens when I try to advance the conversation. I’m not sure if it’s an issue with my code or the input mapping somehow.
It opens to the right place, and I’m still able to click on the back button to go back to the contacts page, but it’s basically frozen where it saved.
Any ideas are appreciated.
extends Control
var current_contact = Global.contact_name
## Sets name & PFP and starts the timeline
func _ready() -> void:
$banner/name_label.text = current_contact
$banner/pfp.texture = Global.contact_image
Dialogic.clear()
Dialogic.Settings.text_speed = 0
Dialogic.Choices.reveal_by_input = true
load_timeline()
## Returns to contact screen & ends the timeline
func _on_back_button_pressed() -> void:
save_timeline()
Dialogic.end_timeline()
get_tree().change_scene_to_file("res://messenger_app/contact_screen.tscn")
## Saves timeline & timeline history
func save_timeline() -> void:
Dialogic.History.save_visited_history()
Dialogic.Save.save(current_contact + "_save", false, Dialogic.Save.ThumbnailMode.NONE)
## Loads timeline & timeline history, unless there is nothing to load; then it starts the timeline
func load_timeline() -> void:
if Dialogic.Save.has_slot(current_contact + "_save"):
Dialogic.History.load_visited_history()
Dialogic.Save.load(current_contact + "_save")
Dialogic.Save.resume()
else:
Dialogic.start(current_contact)