Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | EdgyBlock |
Hi, i’m a complete beginner to godot so sorry if my code is unreadable trash. Here it is:
extends Sprite
export (PackedScene) var Pipe
onready var new_pipe = Pipe.instance()
func spawn_pipe():
new_pipe.position = Vector2(-30.941, 4.235)
add_child(new_pipe)
print(“Duplicated”)
I’m sorry i cant get the code sample thing to work ):
For context, i’m making a flappy bird clone and i need the pipes that you go over to spawn and spawn and spawn. The spawn pipe function is hooked up to a timer and it gives the error above.