i was following a tutorial and wrote the code as is but my charecter is just stuck at 0,0 although in the tutorial it was moving freely
Make sure to paste scripts instead of screen shots
Seems like you must be getting an error no? Does your game freeze and the editor present a stack trace?
I believe your anim
variable needs a dollar sign, this means to get a node named “AnimatedSprite2D”, without the dollar sign it gets a different value that isn’t useful.
var anim = $AnimatedSprite2D
Then you will need to use lowercase .play
on it.
i added the $ sign and lowercased the p just like u asked and now i am getting an error called,
Player.gd:40 @ player_anim(): Node not found: "AnimatedSprite2D" (relative to "/root/world/Player").
(also thanks for letting me know about the usage of ``` i am new to these things so i didnt know about them)
edit: i fixed the error, i changed the name of the animatedsprite2d which seemed to be causing the error but my charecter still isnt moving
final edit: i was trying to move the charecter using the wasd keys even tho by default its set to the arrow keys omg i am so dumb xD
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.