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.
-
thirstyoctopus
- Regular
- Posts: 72
- Joined: Mon Aug 27, 2018 12:04 pm
- Projects: Romance Visual Novel story
- Organization: Thirsty Octopus
-
Contact:
#1
Post
by thirstyoctopus » Tue Apr 30, 2019 11:13 am
Hi guys
This is just a quick one really. I have added a little hud to my game which I want hidden, but can only be activated by implementing a specific key combination. This is a beta testing feature.
I'd like the combination to be Alt+Shift then the backtick key (`)
However I do not know how to specify the ` key in Ren'py keymaps.
Here's what I have:
Code: Select all
screen hud_toggle:
if renpy.get_screen("test_hud"):
key "alt_shift_K_xxxx" action Hide("test_hud")
else:
key "alt_shift_K_xxxx" action Show("test_hud")
where the xxxx is whatever the backtick key is called. I did some searching and suggestions included grave, tilde, quoteleft and asciitilde but none of these work, they just throw an error saying:
Code: Select all
AttributeError: 'module' object has no attribute 'K_grave'
or whatever one I use.
Anyone know how to reference this key? It's the one on the top left of a Windows keyboard (with the broken pipe symbol alongside it)
Users browsing this forum: Bing [Bot], Google [Bot]