Hi, I'm a beginner with Godot.
I've just finished following UmaiPixel's Platformer Tutorial. I wanted to add a second attack, which is a stationary melee slash as opposed to a fireball projectile as shown in the tutorial.
In order to shorten the work time, I've duplicated the Fireball scene from said tutorial and adjusted it accordingly; same goes for the fireball attack code within the Player.
The desired effect is when I press the 'slash' attack button, utilizing the AnimationPlayer node, the slash animation will play, then once its finished, the attack as a whole will be 'queue-freed.'
The issue I've come across is that although the attack is 'queue-freed' once the animation is finished, the animation itself plays way too fast in-game, almost like within a split-second.
Originally I thought that the duration of '0.4' was the issue, so then I went and modified it to 1 second, and yet it still results in playing the animation way too fast in-game.
Here's the code:
var velocity = Vector2()
var direction = 1
direction = dir
if dir == -1:
$Sprite.flip_h = true
velocity.x = delta * direction
if "Enemy" in body.name: