Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Right click be default shows the menu. That confused several test players (all VN beginners) a lot. I therefore took that out by removing it from the keymap with $ config.keymap['game_menu'].remove('mouseup_3').
Now I got the request that right click should roll back one line. That also makes sense, but I am afraid that it will also lead to confusion. My amount of newbies for test playing is exhausted, so I just wanted to know if you have any experiences with that? Moreover: how would I set this up? The obvious method of activating a screen that has key 'mouseup_3' action Rollback()
did not work: it still goes to the menu then! (Solved that part: the screen must be opened after start, not already at init.)
I suppose you could give your players the choice to configure the interaction themselves, through a persistent variable, in the preferences screen. For example, they could choose between:
- show pause menu
- perform a rollback
- do nothing at all
Now, I'm no expert on keymaps, but I've done some testing and this solution seems to work (but it requires a restart of the game for the setting to take effect)
init python:
def pref_update_rightclick():
List = [ "game_menu", "rollback" ]
for i in List:
if 'mouseup_3' in config.keymap[i]:
config.keymap[i].remove('mouseup_3')
if i == persistent.preferences_rightclick:
config.keymap[i].append('mouseup_3')
if not persistent.preferences_rightclick:
persistent.preferences_rightclick = "game_menu"
pref_update_rightclick()