This site is currently in read-only mode during migration to a new platform.
You cannot post questions, answers or comments, as they would be lost during the migration otherwise.
0 votes

I'm doing the controls and It's not really working and It might has to do with this error right here:

error(13,0): Unindent does not match any outer indentation level.

But I have no idea how to fix it. Here's the code by the way:

extends KinematicBody2D
const GRAVITY = 500.0
const WALKSPEED = 200
var velocity = Vector2()
func _fixed
velocity.y += delta * GRAVITY
if (Input.isactionpressed ("Left")):
velocity.x += -WALKSPEED
elif (
velocity.x -= WALK
velocity.x = 0
var motion = velocity * delta
move( motion )
if (iscolliding()):
var n = get
motion = n.slide(motion)
velocity = n.slide(velocity)
func _ready():
in Engine by (83 points)

1 Answer

0 votes

you´ll have to indent your code, check the Docs or take a look at a Python Tutorial, GDScript is doing this in the same way.

by (73 points)

Thanks. It's just that I didn't done code with Python but rather Lua and HTML. Thanks though ^_^

Edit :

and take into account that three times Space-key isnt the same like one time Tab-key

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.