#Frist 2d game Doc Help
1 messages · Page 1 of 1 (latest)
I will when I get home from work
Where are you defining what $AnimatedSprite2D is?
Is it not defined by the scene? as the node? should i define it the
Func _ready(): {TAB} screen_size = get_viewport_rect().size {TAB} $AnimatedSprite2D = get_node("AnimatedSprite2D")
Looks like you need to call get_node("Area2D/AnimatedSprite2D") and then store it in a variable
Like this
?
It looks like your script is attached to Player, so it should be get_node("Area2D/AnimatedSprite2D")
It's a relative path
gotcha i thought your were sayin either or lol
Ah no worries haha
: /
I think im doin it wrong still
does it also need node2d since thats what player is
You need to store it in a variable, and then reference that variable when you want to play the animation