- Edited
xyz thanks it worked
but using _enter_tree(): on lvl_e1.gd throws a nill error i had to use func _ready(): on other level e2, e3, e4, etc... _enter_tree(): seems to works.
I used the function in the camera2D instead, my player node script is kind of full:
*lvl_e1.gd
extends Node2D
var map_POS = Vector2(272, 112);
func _ready():
Player.cam2D.level_started()
*lvl_e2.gd
extends Node2D
var map_POS = Vector2(240, 128);
func _enter_tree():
Player.cam2D.level_started()
you can also put a dedicated positional marker node into level
Ive added a Marker2D into the nextLevel, but i cant move this node position when its on the level ?
the other nextLevel scenes on the level are duplicates. There are 2 nextLevel's in most levels the player either comes from the left or right ? I dont see how it can be done in an auto way ?
If i could move the Marker2D node in the editor for each nextLevel it would work, but the sub nodes cant be accessed in the editor