Trouble 1 (solved). Several presses = several help screens. F1 can be pressed several times with showing several help dialogues in a stack way.
- A value was set to 1 in the beginning of help, to 0 in the end.
- I inserted a value check in the beginning of help, so no second calls are possible.
Code: Select all
init:
$ game_is_in_help = 0
label help:
if game_is_in_help:
return
$ game_is_in_help = 1
jump help_loop
label help_loop:
#your help dialogues goes here
label help_finish:
$ game_is_in_help = 0
return
- I decided to have my own F1 handler, that would work only inside of game, not in main menu. See "Konami code" in cookbook for details on keypress handlers.
- I just inserted "Help" to main menu list to make it possible to read help outside of game process.
- Let's upgrade the code from above.
Code: Select all
label help:
if game_is_in_help:
return
python:
game_is_in_help = 1
tmp_window_subtitle = _window_subtitle
jump help_loop
label help_loop:
$ _window_subtitle = u" - Help"
#your help dialogues goes here
label help_finish:
python:
_window_subtitle = tmp_window_subtitle
game_is_in_help = 0
return
Trouble 4 (solved). Saves inside help is enabled and buggy. Save game name and screenshot are from help, save point is a point from where help was called. Also, you can't save when in a new context, due to not being able to persist the state of python code.
- I want to implement some disabling functions for my own user environment (quick save by F6, floating widgets bar, etc...)
- I also want to disable right mouse click or escape keys by setting _game_menu_screen to None (or something different from usual, to handle event more properly).