Recreation Growth Stack Alternate is a query and reply web site for skilled and unbiased sport builders. It solely takes a minute to enroll.
Anyone can ask a query
Anyone can reply
The most effective solutions are voted up and rise to the highest
Requested
Considered
11 occasions
Here’s a screenshot of my venture displaying the error message at line 13:
And right here is the total code:
extends KinematicBody2D
var motion = Vector2();
var up = Vector2(0, -1);
var velocity = 200;
var isAttacking = false;
func _precess(delta):
if Enter.is_action_pressed("ui_right") && isAttacking == false:
motion.x = velocity;
$AnimatedSprite.play("run");
elif Enter.is_action_pressed("ui_up") && isAttacking == false: (ERROR HERE)
motion.x = velocity;
$AnimatedSprite.play("walk2");
elif Enter.is_action_pressed("ui_left"):
motion.x = -speed;
$AnimatedSprite.play("walk3");
elif Enter.is_action_pressed("ui_down"):
motion.x = -speed;
$AnimatedSprite.play("stroll");
else:
motion.x = 0;
if isAttacking == false:
$AnimatedSprite.play("parada");
if Enter.is_action_just_pressed("Assault"):
$AnimatedSprite.play("Atak");
isAttacking = true;
motion = move_and_slide(motion, up * delta);
How do I repair this error?
$endgroup$
1
default