Add show_menu and hide_menu ESC commands
Fixes godot-escoria/escoria-issues#48 Fix: tween was stopped_all before starting Fix: reload locale from settings in ESCGame Since main menu and pause menu are now loaded from ESCGame and not from escoria.gd, this must be done here. Fix: small crash in load game But save and load are broken at the moment... Fix: check save and load after main menu changes Required fixes Fix: manage the game scene better in show and hide_menu Enh: transition back in to the previous room if there was one Fix a bug occurring where change_scene awaits forever for setup to end Reworked change_scene and esc_room implementation to avoid yielding Added a controller variable to allow new event run in events_manager Don't empty the events queue if the running_event was interrupted Fixed transitions and automatic transitions in change_scene Added trace log level (for esc_compiler in particular) Fixed various bugs in ESC scripts Fix a bug where exit_scene happened multiple times where fast walking Needed to clear the event queue Fixes ready event was run because BYPASS_LAST_SCENE wrongly set Inverted parameter "disable_automatic_transitions" for change_scene, hide_menu, show_menu commands Fix broken sched_event Fixes as requested in PR
This commit is contained in:
13
game/rooms/room14/esc/button_main_menu.esc
Normal file
13
game/rooms/room14/esc/button_main_menu.esc
Normal file
@@ -0,0 +1,13 @@
|
||||
|
||||
:use
|
||||
|
||||
|
||||
# Show main menu, automatic transitions ENABLED
|
||||
show_menu main true
|
||||
|
||||
# wait 2 seconds
|
||||
wait 2
|
||||
|
||||
# Hide main menu, automatic transitions ENABLED
|
||||
hide_menu main true
|
||||
|
||||
37
game/rooms/room14/esc/button_main_menu_change_scene.esc
Normal file
37
game/rooms/room14/esc/button_main_menu_change_scene.esc
Normal file
@@ -0,0 +1,37 @@
|
||||
|
||||
:use
|
||||
|
||||
# This event demonstrates the following:
|
||||
#- fade out to black
|
||||
#- show the main menu (automatic transition disabled to manage those manually)
|
||||
#- wait 2 seconds
|
||||
#- change scene (automatic transition disabled to managed those manually) to reload this same room
|
||||
|
||||
|
||||
# Fade out to black
|
||||
transition fade_black out
|
||||
wait 2
|
||||
|
||||
# Show main menu, automatic transition DISABLED
|
||||
show_menu pause
|
||||
|
||||
# Showing menu
|
||||
transition shards in
|
||||
|
||||
# Wait 2 seconds on menu
|
||||
wait 2
|
||||
|
||||
# Transition out before hiding menu
|
||||
transition fade_black out
|
||||
|
||||
# Hide the menu
|
||||
hide_menu pause
|
||||
wait 1
|
||||
|
||||
# Do NOT transition IN as this transition will be managed by the room's :setup event!
|
||||
# If you transition IN here instead of room's :setup event, you will show the previous room
|
||||
|
||||
# Change scene to same scene, disabled automatic transition
|
||||
change_scene res://game/rooms/room14/room14.tscn true
|
||||
|
||||
# Do not transition here either, as change_scene ends the execution of this script
|
||||
13
game/rooms/room14/esc/button_pause_menu.esc
Normal file
13
game/rooms/room14/esc/button_pause_menu.esc
Normal file
@@ -0,0 +1,13 @@
|
||||
|
||||
:use
|
||||
|
||||
# Show pause menu, automatic transition are disabled by default
|
||||
# So we can manage them manually using `transition` ESC command
|
||||
show_menu pause
|
||||
|
||||
# wait 2 seconds
|
||||
wait 2
|
||||
|
||||
# Hide pause menu, automatic transition are disabled by default
|
||||
# So we can manage them manually using `transition` ESC command
|
||||
hide_menu pause
|
||||
5
game/rooms/room14/esc/left_exit.esc
Normal file
5
game/rooms/room14/esc/left_exit.esc
Normal file
@@ -0,0 +1,5 @@
|
||||
:exit_scene
|
||||
set_sound_state _sound res://game/sfx/sounds/doorOpen_2.ogg false
|
||||
change_scene "res://game/rooms/room13/room13.tscn"
|
||||
|
||||
|
||||
3
game/rooms/room14/esc/right_exit.esc
Normal file
3
game/rooms/room14/esc/right_exit.esc
Normal file
@@ -0,0 +1,3 @@
|
||||
:exit_scene
|
||||
#set_sound_state _sound res://game/sfx/sounds/doorOpen_2.ogg false
|
||||
#change_scene "res://game/rooms/room15/room15.tscn"
|
||||
29
game/rooms/room14/esc/room14.esc
Normal file
29
game/rooms/room14/esc/room14.esc
Normal file
@@ -0,0 +1,29 @@
|
||||
|
||||
:setup
|
||||
|
||||
> [eq ESC_LAST_SCENE room13]
|
||||
teleport player r14_l_exit
|
||||
# Set player look right
|
||||
set_angle player 90
|
||||
stop
|
||||
|
||||
> [eq ESC_LAST_SCENE room15]
|
||||
teleport player r14_r_exit
|
||||
# Set player look left
|
||||
set_angle player 270
|
||||
stop
|
||||
|
||||
# If we're coming from the same room as this one, we manage the player's position
|
||||
# AND the transition IN manually
|
||||
> [eq ESC_LAST_SCENE room14]
|
||||
teleport player start
|
||||
|
||||
# Set player look left
|
||||
set_angle player 270
|
||||
|
||||
# Fade in from black
|
||||
transition fade_black in
|
||||
stop
|
||||
|
||||
|
||||
:ready
|
||||
Reference in New Issue
Block a user