0 votes

so i watch a tutorial about power up the fireball
got just 1 error
and these are my code:
if Input.isactionjustpressed("uidown") && isattacking == false:
if is
onfloor():
velocity.x= 0
is
attacking = true
$AnimatedSprite.play("ATK")
if fireballpower == 1:
var fireball = FIREBALL.instance()
elif fireball
power == 2:
var fireball = FIREBALLRED.instance()
if sign ($Position2D.position.x) == 1:
fireball.setfireballdirection(1)
else:
fireball.setfireballdirection(-1)
getparent().addchild(fireball)
fireball.position = $Position2D.global_position

Godot version the steam version
in Engine by (12 points)

Aaand.. you haven't provided what the ERROR is

Hi ben, we'll need a bit more information before we can help you fully. It would be good to know exactly what error you're getting when trying to run your script. Also, the formatting for the code you pasted is a bit messed up. I'd ask that you use the code block option in the response box (looks like two bolded curly brackets: { }), then paste your code into the section provided, or ensure that there are four spaces in front of each line of code and a new line above the block to get the code-block effect to work. For example:

var code_example = 1
func exampleFunc():
    indented()

Looks like this, where periods (.) represent spaces and a new-line above:
\n
....var code_example = 1
....func exampleFunc():
........indented()

Make sure to check the preview below your response to ensure it looks right. For now, we can't tell where your indentations are so the intent of the script is lost.

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.