I'm trying to make a Visual Novel and have been struggling with making a proper dialogue box. i haven't made a lot of progress until the guys at GDquest made this 2 part series on how to make one. here's a link to it. Thankfully i was able to make a working dialogue bow out of a json file; but i had trouble with loading a sprite using both a json file and a resource file.
here's my code
func make_texture(character_name: String, expression: String = "neutral") -> Texture:
assert character_name in character# i keep getting an assertion failed error here
assert expression in character[character_name].expressions
return character[character_name].expressions[expression]
and then i would call the function in a separate script like so.
T_data.make_texture("dave")