Page 1 of 1

Use either key "strings" for button?

Posted: Tue Apr 17, 2018 12:52 am
by wyverngem
Can I use "key" in the screen language to setup two different keys for the same action? Let's say I wanted the player to either select by pressing 1 or by pressing num_pad 1?

Code: Select all

key "K_KP" + str(n) action i.action
Makes it so I can hit the num_pad.

Code: Select all

key str(n) action i.action
Makes it so that I use the regular number keys at the top of the letters.

Re: Use either key "strings" for button?

Posted: Tue Apr 17, 2018 3:46 am
by xavimat
Try it. That will work.
Renpy does not bother about different elements triggering the same action. They can be buttons/textbuttons/imagebuttons/hotsposts in imagemaps/keys/timers (I think that's all).

Re: Use either key "strings" for button?

Posted: Wed Apr 18, 2018 1:18 am
by wyverngem
Hrm, it does, but not sure if there's a consequence for using it like this or if there's a better way.