Working with v4.3.stable
. I’m a beginner on Godot.
I have a Scene
class that handles the scenes for my game, and the .new
function is NOT working (evident by the lack of the success marker).
class_name testscene extends Node2D
var Scene = preload("res://assets/scripts/library/scene/base_scene.gd")
var is_scene_completable
func _ready() -> void:
print("START!")
currentScene = Scene.new(
[Vector2(-1000, 1000), Vector2(1000, -1000)],
Vector2(0,0),
$Player,
$ExitPlatform
)
class_name Scene extends Node2D
var baseExit = preload("res://assets/scripts/library/scene/base_exit.gd")
var newExit
func _init(boundaries: Array[Vector2], defaultPosition: Vector2, currentPlayer: CharacterBody2D, exit: StaticBody2D) -> void:
SceneValues.boundaries = boundaries # should use get/set functions for this
SceneValues.defaultPosition = defaultPosition
SceneValues.currentPlayer = currentPlayer
newExit = baseExit.new(exit)
print("HELL YEAH") # success marker
return