Event Trigger
Hello everyone, I'm creating a visual novel with a navigational system. Right now, I'm trying to allow the player to click on a character and have the option to spend time with them (which would trigger a dialogue event with scenes) or go back. The problem is, when the event is called, my back, skip, auto, save etc. buttons are all hidden and if I press escape, the game exits the event and doesn't even bring up the settings menu. Here's my room label, navigation buttons, character interaction, and event dialogue:
label livingroom1:
$ current_room = "living_room"
if not event_active and renpy.music.get_playing() != "audio/dream.mp3":
play music "audio/dream.mp3" volume 0.5
if trigger_spend_time_aki == True:
$ trigger_spend_time_aki = False
call spend_time_aki
scene livingroom
show screen navigation_system
show screen day_system
show screen navigation_buttons
show screen main_menu_map_button
show screen quest_icon
show screen heart_icon
""
return
screen character_interaction():
modal True
vbox:
spacing 10 # Space between the individual frames
xpos -20
yalign 0.7
# Sleep Option
frame:
style "bed_menu_button"
at slide_in_from_left
imagebutton:
idle "button.png"
hover "button hover.png"
action [Function(advance_time), SetVariable("trigger_spend_time_aki", True), Function(refresh_room)]
xsize 500
ysize 75
xpos 0
yalign 0.5
label "Spend time (+1 affection)" style "bed_menu_button_text":
xalign 0.5
yalign 0.5
# Back Option
frame:
style "bed_menu_button"
at slide_in_from_left
imagebutton:
idle "button.png"
hover "button hover.png"
action [Return()]
xsize 500
ysize 75
xpos 0
yalign 0.5
label "Back" style "bed_menu_button_text":
xalign 0.5
yalign 0.5
screen navigation_buttons():
# Place buttons in a fixed position with manual spacing
fixed:
xpos -20 # Adjust this to position the entire block of buttons
ypos 900 # Adjust the vertical position
if not trigger_spend_time_aki and not show_quests_ui and not show_charactermenu_ui and not event_active and not show_world_map_screen and not show_completed_quests_ui and current_room in ["living_room"] and time_of_day == "Morning" and quest_aki_talk in completed_quests:
imagebutton:
idle "aki afternoon icon.png"
hover "aki afternoon icon.png"
action [ShowMenu("character_interaction"), Function(renpy.restart_interaction)]
at character_effect
xpos 860
ypos 570
label spend_time_aki:
$ event_active = True # Set the event as active
stop music
play music "audio/serenity.mp3"
scene stv1 with fade
mc "Good morning, aki."
$ event_active = False # Event ends, allow clicks again
stop music
play music "audio/dream.mp3" volume 0.5
return
Hope anyone can help :)