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.
So I know you can do something like this(see above) and make it so a choice doesn't show up. But how would you make it just display locked? I tried the simplest idea I could think of. Just adding an else(1). Alas this doesn't really work. It errors out... so I tried it with a python if(2) but that also fails. Is there anyway I can do this with out having to say... listing in Screens.py all the choices(3) and check if their condition is triggered each time(I hope so... sounds quite laggy)? I assume there is a better way I'm overlooking.
screen choice(items):
style_prefix "choice"
vbox:
for i in items:
if i.caption[0] == '!':
textbutton i.caption[1:] action None
else:
textbutton i.caption action i.action
2) Now any menu item which starts with ! will be represented by inactive button. Make two choices with complementary conditions (only one or other will be shown):
label start:
$ locked = True
menu menu1:
"Unlock":
$ locked = False
jump menu1
"!Locked" if locked:
pass
"Locked" if not locked:
'You get the secret choice'
return
Thank you! Mind if I ask how I'd go about changing the choice button image? Is it as simple as some how assigning it a property like gui.button.choice_background = "new path" ?