I'm new to coding trying to create a 2d endless runner and only have one platform and struggling on how to generate different various platforms I don't want them to be the same size as the first one I want more than one platform you could jump on and to also have them be in different sizes. One last thing the platforms only come in a straight line I want the platforms to randomly generate all over.
extends Node2D
const OBSTACLE = preload("res://scenes/Platform_big.tscn")
func ready():
Global.currentscore = 0
func onTimertimeout():
var obstacle = OBSTACLE.instance()
addchild(obstacle)
func onScoreTimertimeout():
Global.currentscore +=1
func process(delta):
$Label.text = "" +str(Global.currentscore)