Numerical choices in choices menu?
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.
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.
Numerical choices in choices menu?
Like in rpg games - where you can press numbers on keyboard to answer. Is it possible to do someway?
Re: Numerical choices in choices menu?
Choices are stored in a list (referenced as items in the choice screen). You can modify the choice screen to show numbers for each item and use the key statement (https://www.renpy.org/doc/html/screens.html#key ) to trigger choices.
Re: Numerical choices in choices menu?
You need to modify the choice screen, smth like
Code: Select all
screen choice(items):
# style_prefix "choice"
#
# vbox:
# for i in items:
# textbutton i.caption action i.action
style_prefix "choice"
for n, i in enumerate(items, 1): # n would be the number starting from 1
if n<10:
key str(n) action i.action
textbutton str(n) + ") " + i.caption action i.action
Who is online
Users browsing this forum: Ahrefs [Bot], Ocelot