0 votes

Hi there. My question would be that I want more maps in this code, but that they come in line at the start of each game. So when I start the game it is map1 and on the next reload map2 next reload map3..etc
here is my code.Hope you understand. Sorry for my english ,google translate

export (PackedScene) var map_scene = preload("res://maps/Map1.tscn")
onready var map: Node2D = $Map

func _do_game_setup(players: Dictionary) -> void:

func reload_map() -> void:
var map_index = map.get_index()

map = map_scene.instance()
map.name = 'Map'
move_child(map, map_index)
Godot version 3.3.3 stable
in Engine by (14 points)

Please log in or register to answer this question.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.