The overworld grid is programmed as a creator-defined-displayable.
My goal is for the overworld grid to serve as the background for any dialogue triggered on it, like when the player reads a sign for instance. I need player input to not affect the underlying overworld as well. So far I've been unable to to make this happen, either the background of the Say screen is a black screen, or the overworld grid completely covers the character sprite on the Say screen.
Here's the relevant snippets of my code right now:
in overworld_grid_screen_handler.rpy:
Code: Select all
label grid_handler_init:
# SINGLETON OverworldGridHandler, which is a wrapped dict that
# contains all the overworld grids that have been declared.
$ OVERWORLD_GRID_HANDLER = OverworldGridHandler()
$ arrow_player_character = get_arrow_player_character()
return
screen overworld_screen(frozen=False):
modal True
tag overworld
zorder -10
$ config.skipping = None
$ active_overworld_grid = OVERWORLD_GRID_HANDLER.active_grid
if not frozen and (active_overworld_grid and active_overworld_grid.player_can_move):
$ print("Overworld Grid Screen Handler: Freezing actions")
key "mouseup_1" action NullAction()
key "K_RETURN" action NullAction()
key "K_SPACE" action NullAction()
key "K_KP_ENTER" action NullAction()
key "joy_dismiss" action NullAction()
key "K_UP" action NullAction()
key "K_RIGHT" action NullAction()
key "K_DOWN" action NullAction()
key "K_LEFT" action NullAction()
$ renpy.timeout(0)
add active_overworld_grid
label overworld_grid_screen_handler:
$ print("overworld_grid_screen_handler called")
while FORCE_EXIT != True:
$ renpy.retain_after_load()
call screen overworld_screen nopredict
return
label overworld_grid_show_in_background:
$ previous_player_can_move = OVERWORLD_GRID_HANDLER.active_grid.player_can_move
$ OVERWORLD_GRID_HANDLER.active_grid.player_can_move = False
show screen overworld_screen(frozen=True)
return
label overworld_grid_stop_show_in_background:
$ OVERWORLD_GRID_HANDLER.active_grid.player_can_move = previous_player_can_move
return
Code: Select all
# The game starts here.
label start:
call grid_handler_init
call route_4_init
$ OVERWORLD_GRID_HANDLER.active_grid_key = "route_4"
$ FORCE_EXIT = False
$ renpy.profile_screen("overworld_screen")
call overworld_grid_screen_handler
return
Code: Select all
label route_4_green_hates_grass_0:
call overworld_grid_show_in_background
show green angry with fade
PLAYER_CHARACTER "Oh no, not more grass. No, I'm done."
call overworld_grid_stop_show_in_background
return
Any help would be greatly appreciated, I'm pretty new at this ren'py stuff!
GIF of output of current code: https://i.imgur.com/jkmo3TC.gif