When using the Dialogue Manager addon on Godot, I am trying to run a function to change the sprite of a character. My function look like this under my character script:
func ace_change_sprite(index): print("EEE") change_sprite(index)
and my dialogue looks like this:
~ start : test Ace: Hey Miyu! do emit("AceUpdateSprite",3)
When I run this, it prints the "EEE" but it doesn't update the Sprite. My character script is AutoLoaded and I have tried using signals, but still got the same result of "EEE" being printed but nothing else happening.
change_sprite function is this:
func change_sprite(index): $Sprite.texture = load(sprites_path + character_name + str(index) + ".png")
It works when I call it within the player script, changing the sprite, but when I call it outside it doesn't seem to work.