Hello world, so hm... i found a source of multiplayer FPS game, here :
https://github.com/ic3bug/godot-shotgun-party
This source had only "1" map, and i would like to create a second map but
it doesn't display on screen when i connect to the server
here there my modifications : i add this, in the file "menu.gd"
func _on_host_2_pressed():
Game.reload()
Net.reset()
$container/host/buttons/host_2.disabled = true
$container/connect/buttons/connect.disabled = true
yield(get_tree().create_timer(1.0), "timeout")
Game.spawn_map2(0)
Game.spawn_gobot("1", 0)
Net.bot_count = $container/host/bot_count/slider.value
for i in Net.bot_count:
Game.spawn_gobot("bot" + str(i), 2)
visible = false
$drone.stop()
Net.create_server()
And this, in the file "game.gd"
onready var map_scn2 = [preload("res://scenes/maps/map02.tscn")]
(...)
func spawn_map2(map_id : int):
var map2 = map_scn2[map_id].instance()
main.main_pass.add_child(map2)
When i launch the server and i launch "map01", it's ok. When i connect to it from client state, i go on the "map01".
And...
When i launch the server and i launch "map02", it's ok. When i connect to it from client state, i go on the "map01", not the "map02" And i see the "server player"... the same space, but not the correct map.
Anybody could say to me, what i forget to do, for it work, please? I lokking for the solution but i turn in a circle... argh, help xD
thanks for your advice.