Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Please Help With Signaling Animation Player in Godot

A topic by HouseRule created Nov 07, 2022 Views: 245 Replies: 4
Viewing posts 1 to 5
(1 edit)

I'm trying to trigger an animation with a signal. I set up a 2D node "Fader" with an animation player "FaderPlayer". The animation is "FadeAni". This as far as my understanding takes me, but I get a null instance error for the play command.

onready var fade = $Fader/FaderPlayer

func _on_Area2D_body_entered(body)

     get_node("fade").play("FaderAni")

(+1)

onready var fade = $Fader/FaderPlayer

func _on_Area2D_body_entered(body)

     fade.play("FaderAni")

(1 edit)

That's one of the variations I had tried. This indicates to me I've made a mistake somewhere else. Thank you for your help.

I saw the variation that I posted online and tried it. I now understand that it's redundant.

I had the tree set up wrong. The animation now plays and prints "done". However, the dB of MusicLevel1 stays at 0, no matter how I arrange the tree.

It works now, and it still looks like the picture. I noticed the player was behaving strangely. I don't know what happened, but deleting the player and making it again fixed it.