The Godot Q&A is currently undergoing maintenance!

Your ability to ask and answer questions is temporarily disabled. You can browse existing threads in read-only mode.

We are working on bringing this community platform back to its full functionality, stay tuned for updates. | Twitter

0 votes

I'm following the flappy bird tutorial again to tune my skills some more. I'm on Tutorial 3. Spawning. On the I have the following and the line:


is giving the following error:
Invalid call. Nonexistent function 'get_pos' in base 'Node ('.

When I type set_pos() I get auto complete happening but when I type get_pos() I get no auto complete. Strange.

Here is the full code so far:

#script: spawner_pipe

extends Node

const scn_pipe = preload("res://scenes/pipe.tscn")

func _ready():

func spawn_pipe():
    var new_pipe = scn_pipe.instance()

func go_next_pos():
in Engine by (824 points)

Cancel that! I had the script attached to the wrong Node. It was a Node, not a Node2d. Hopefully this helps someone in the future.

1 Answer

+1 vote
Best answer


The answer is simple,Node don't have a position, so get_pos() don't existe. Try to extend from Node2D to fix your problem.

by (370 points)
selected by

Thank you and so sorry for the late reply. I appreciate your help and again, I must have been on another planet not to thank you.

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.