Godot Version
4.3
Question
When I try to use tweeners to change the animation my sprite is using, it either throws up errors because I am using Strings instead of StringNames but when I use String Names it throws up 100s of errors seeming to randomly guess characters until it guesses the right String Name
The Animation still happens it just gives about 50+ errors each time the animation activates.
What strings you’re expetecting to get? I don’t think tweens will give you anything userful for strings.
2 Likes
Sorry. The attack and idle variables are storing the same words as String Names. If I store them as just strings it gaves an error that they should be string names but as string names they give the errors above
The errors above is because your node doesn’t have this animation names, the question is, what values you expected your variable would have doing a tween on them?
I know, the animation names are “attack” and “idle” which i have stored as variables be cause i was hoping it would prevent this error. I dont know why it is trying to pass gibberish in to the animation.
Because is how tweening strings works, will change letter by letter until reach the target word, technically is impossible tween strings because doesn’t exist an precise order to change them. If you want to change the animation after a x time you need to use get_tree().create_timer(x)
and await
instead
1 Like
I think also they could just do it with a CallbackTweener instead of a PropertyTweener.
I glanced at this thread quickly this morning and was baffled but your post made it really clear what they’re doing wrong.
Edit to add: CallbackTweener comes with a set_delay function, too.