You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey @SymbiontZ, I just ran into this exact issue last week. @Jowan-Spooner suggested they might be able to remove the requirement that timelines have a valid path for resource_path and that they appear in the project settings dtl directory list. That is the ultimate source of this issue. In the meantime, I've developed a rather clunky workaround if you want to use it. You have to save your code-created timeline as a resource. I am using a temporary folder and clearing it regularly since my timelines are one-time-use only.
Here's what my version looks like:
# Save resource path for use (needed by Jump events)varres_path: String=dialogic.current_timeline.resource_path# Build custom eventsvarevents: Array=get_events()
# Create timeline from eventsvarembedded_timeline: DialogicTimeline=DialogicTimeline.new()
embedded_timeline.events=eventsembedded_timeline.events_processed=true# Append custom events to current timelinevarcurrent_events: Array=dialogic.current_timeline_eventsvarcopy: Array=current_events.duplicate()
dialogic.current_timeline_events=Utilities.insert_array_at_index(copy, events, dialogic.current_event_idx+1)
# Create and save brand new timeline to fix current_timeline issuevarfull_timeline: DialogicTimeline=DialogicTimeline.new()
full_timeline.events=dialogic.current_timeline_eventsfull_timeline.events_processed=truedialogic.current_timeline=full_timelinedialogic.current_timeline_events=full_timeline.eventsvartemp_name: String="timeline_{0}.dtl".format([Time.get_ticks_usec()])
vartemp_path: String="res://dialogic/timelines/temp/"+temp_namedialogic.current_timeline.resource_path=temp_pathResourceSaver.save(dialogic.current_timeline, temp_path)
# Setting meta here because Dialogic expects itifEngine.has_meta("dtl_directory"):
varnew_dict: Dictionary=Engine.get_meta("dtl_directory")
new_dict[temp_name] =temp_path
There may be a better way to do this, but it seems to work for me now.
The problem
Using jump node in a timeline created by code results on error that says:
Trying to assign value of type 'Nil' to a variable of type 'String'.
Stacked Fotograms:
0 - res://addons/dialogic/Core/DialogicResourceUtil.gd:65 - at function: get_unique_identifier
1 - res://addons/dialogic/Modules/jump/event_label.gd:22 - at function: _execute
To Reproduce
Expected behavior
I expected to get the correct sequence of dialogue:
Screenshots
System (please complete the following information):
Solutions
I didn't reach any solution
I tried write jump/label "test", jump/label TEST, jump/label Test
Possible fixes
I have no idea sorry.
The text was updated successfully, but these errors were encountered: