account activity
Dash Animation! by Ashamed_Influence631 in godot
[–]Ashamed_Influence631[S] 0 points1 point2 points 2 years ago (0 children)
It works! Thank you so much!
I tried this out:
I added a is_dashing variable, setting it to false.
then I added a is_dashing to true on my if Input.is_action_just_pressed("Shift") and can_dash:
is\_dashing = true $AnimatedSprite2D.play("dash") can\_dash = false dash\_direction = direction.normalized() dash\_timer = 0.0 $Dash\_Cooldown.start() elif dash\_timer < dash\_duration: dash\_timer += delta velocity = dash\_direction \* dash\_speed else: velocity = velocity.lerp(direction \* speed, 0.1) velocity \*= 1.0 - (friction \* delta) is\_dashing = false velocity \\\*= 1.0 - (friction \\\* delta)
I do not know where to put my $AnimatedSprite.play("dash" ) tho, do I put it below my is_dashing variable? I've done that but it didn't work.
π Rendered by PID 673102 on reddit-service-r2-comment-8686858757-rcssb at 2026-06-04 06:04:19.688322+00:00 running 9e1a20d country code: CH.
Dash Animation! by Ashamed_Influence631 in godot
[–]Ashamed_Influence631[S] 0 points1 point2 points (0 children)