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

this is the script

extends RigidBody2D

export var FLAP_FORCE = -200


onready var animator = $AnimationPlayer

var started = false


func physicsprocess(delta):
if Input.isactionjust_pressed("flap"):
if !started:

if rotation_degrees <= MAX_ROTATION_DEGREES:  
     angular_velocity = 0
    rotation_degrees = MAX_ROTATION_DEGREES  #the error is here

func start():
if started : return
started = true
gravity_scale = 5.0"Flap")

func flap():
linearvelocity.y = FLAPFORCE
angular_velocity = -8

Godot version 3.5
in Engine by (23 points)

As the error states, you have an indention problem in your code. Unfortunately, that's impossible for anyone to find in the code you posted as it's not formatted for the forum.

Please log in or register to answer this question.

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.