AnimatedSprite flip horizontali and save position

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By maritov

how to do flip_h AnimatedSprite to after playing animation AnimatedSprite remember position to which directed sprite

my code:
if velocity.x <= 0:
$AnimatedSprite.flip_h = true
elif velocity.x > 0:
$AnimatedSprite.flip_h = false

what i must add to in code to do it work?

I’m not found how to remove comment well i am write answer myself:

You must to remove “=” from string:

if velocity.x <= 0:

maritov | 2022-12-29 14:51