probably, but ive already started a duplicate project. currently having the same scenario. i can do my jab animation only when i jump.
extends KinematicBody2D
const SPEED = 100
const GRAVITY = 10
const JUMP_POWER = -150
const FLOOR = Vector2(0, -1)
var velocity = Vector2()
var on_ground = false
func physicsprocess( _delta):
if Input.is_action_pressed("ui_left"):
velocity.x = -SPEED
$player.play("walk")
elif Input.isactionpressed("moveright"):
velocity.x = SPEED
$player.play("walk")
else:
if onground == true:
$player.play("idle")
velocity.x = 0
if Input.is_action_pressed("ui_up"):
if on_ground == true:
velocity.y = JUMP_POWER
on_ground = false
if Input.is_action_pressed("attack_jab"):
$player.play("jab")
velocity.y += GRAVITY
if is_on_floor():
on_ground = true
else:
on_ground = false
velocity = move_and_slide(velocity, FLOOR)
this is my current script. all animations play properly except for jab..
this is the current error message:
E 0:00:59.239 emit_signal: Error calling method from signal 'animation_finished': 'KinematicBody2D(player.gd)::_on_player_animation_finished': Method not found..
<C++ Source> core/object.cpp:1260 @ emit_signal()