Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

timeline_end signal returns timeline filename instead of timeline name #904

Closed
IsThisTheFuture opened this issue May 25, 2022 · 1 comment
Labels
Bug 🐞 Something isn't working

Comments

@IsThisTheFuture
Copy link

The problem

Describe the bug
I have multiple dialogs in a scene and after each dialog ends I use an 'after_dialog' function that gets triggered by the 'timeline_end' signal to check for the timelines name that was just played and do stuff accordingly.
When I start a dialog timeline and connect the "timeline_end" signal as shown below, the signal returns the timelines filename (e.g. 'timeline-1653476470.json') as a parameter instead of the actual name I have given it in the Dialogic Editor (in this case: 'shopkeeper-convo').
This makes the code unreadable since I have no idea what conversation 'timeline-1653476470.json' actually is

To Reproduce
Steps to reproduce the behavior:

func _on_dialog_area_body_entered(body):
	var new_dialog = Dialogic.start("shopkeeper-convo") 
	new_dialog.connect("timeline_end", self, "after_dialog")
	add_child(new_dialog)

func after_dialog(timeline_name):
	if timeline_name == "shopkeeper-convo":
		# Does nothing, because timeline_name is the filename
	elif timeline_name == "timeline-1653476470.json":
		# This is how I have to do it right now

Expected behavior
I would expect Dialogic to return the timeline name (e.g. "shopkeeper-convo") via the 'timeline_end' signal instead of the filename.

System (please complete the following information):

  • OS: Linux (Arch Linux, kernel 5.17.9)
  • Godot Version: 3.4.4, also 3.5RC2
  • Dialogic Version: 1.4.1

Is this expected behavior? It just seems so unintuitive to use the filename instead of the conversations name, which the user would actually be able to interpret.
However, if this works as intended, how should I go about it instead? Should I set the 'dialogic_signal' in the timeline editor and add the timeline name as a parameter?

@coppolaemilio coppolaemilio added this to the Version 1.4.3 milestone Jun 18, 2022
@coppolaemilio coppolaemilio added the Bug 🐞 Something isn't working label Jun 18, 2022
zaknafean added a commit to zaknafean/dialogic that referenced this issue Jul 5, 2022
We track the human readable timeline_name and return it during emitted signals
coppolaemilio pushed a commit that referenced this issue Jul 6, 2022
We track the human readable timeline_name and return it during emitted signals
@zaknafean
Copy link
Collaborator

Fixed with #979. Timeline end and start both push the human readable timeline path/name that Started the dialog. If you change timelines it won't return the name of the new one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug 🐞 Something isn't working
Development

No branches or pull requests

3 participants