![]() |
Attention | Topic was automatically imported from the old Question2Answer platform. |
![]() |
Asked By | Criepstar |
So I’m trying to make an endless runner and I took a code from the internet for the endless generation.
So here is the code:
extends Node2D
export (Array, PackedScene) var scenes
func _ready():
add_wall()
func _physics_process(delta):
pass
func add_wall():
for scene in scenes:
var object = load("res://Scenes/Objects1.tscn")
var objectinstance = object.instance()
objectinstance.position = Vector2(80, -200)
get_parent().add_child(object)
If I run the code nothing happens, no error no warning just nothing. I tried different tutorials too, but there was no difference at the result. Whats wrong with the code?