i set sprite2d.gd to autoload.this script is for character movement.
but when i changed it position via autoload,character sprite not move.
is autoload just a duplicate of characterbody2d.gd?
How is character_autoload defined? Which node has this script?
Autoload adds the designated scene/script to the root window as you see character_autoload. If the script you pasted is the one marked as autoload then you need to show more of it.
Or make a global script that autoloads that takes in a “game” script that has an @onready var for the player as seen in this video https://www.youtube.com/watch?v=KOI0y1OC_tM
katdwag57
thanks for comment.
Is autoload simply a copy?
When I set variables in a script using autoloading and modify them, the original script doesn’t seem to change.