Make ESCLocation is_start_location work (#421)

Introducing BYPASS_LAST_ROOM global to allow changing scene without considering the previous room
Fixes godot-escoria/escoria-issues#40
This commit is contained in:
Julian Murgia
2021-10-26 16:36:02 +02:00
committed by GitHub
parent 2e87a2c1e6
commit 9dbcf2b58b
20 changed files with 40 additions and 45 deletions

View File

@@ -48,12 +48,14 @@ func _ready():
# Switch to the selected room
func _on_button_pressed():
escoria.globals_manager.set_global("BYPASS_LAST_SCENE", true, true)
var script = escoria.esc_compiler.compile([
":debug",
"change_scene %s" % _options_paths[_selected_id]
])
escoria.event_manager.interrupt_running_event()
escoria.event_manager.queue_event(script.events['debug'])
# A room was selected, store the selection