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.
Okay so I'm making a custom screen text box for a portion of my game where the content is password protected. I decided to copy the code from here but the problem is I'm not sure how to hide the password from the text box and putting "else" automatically says wrong password by default.
I have found a way to fix the problem by removing the password.func
But then there's another problem, whenever I click the button it still shows wrong password even I input the right text and it won't proceed in the label:
LittleRainySeasons wrote: ↑Mon Nov 20, 2023 7:47 pm
But then there's another problem, whenever I click the button it still shows wrong password even I input the right text and it won't proceed in the label:
You forgot to actually put in a value object for the input field. Without it, it's not changing any variable in the background. At the moment you just have an input field with some default text inside it.
LittleRainySeasons wrote: ↑Mon Nov 20, 2023 7:47 pm
But then there's another problem, whenever I click the button it still shows wrong password even I input the right text and it won't proceed in the label:
You forgot to actually put in a value object for the input field. Without it, it's not changing any variable in the background. At the moment you just have an input field with some default text inside it.
Also is there a way to disable the enter key when inputting the wrong password? Because whenever I do press enter instead of the button, it triggers the welcome page instead of "WRONG PASSWORD"
LittleRainySeasons wrote: ↑Tue Nov 21, 2023 3:58 am
I tried the password mask thing and it says "invalid syntax"
Which Renpy version are you using? Because it's pretty valid and works like a charm on my end.
I'm not sure why you are using a complicated way like creating an Input object and then adding it as a Displayable, while Renpy supports using the syntax I provided. Here you can read about the "input" keyword for screens: https://www.renpy.org/doc/html/screens.html#input
Also is there a way to disable the enter key when inputting the wrong password? Because whenever I do press enter instead of the button, it triggers the welcome page instead of "WRONG PASSWORD"
LittleRainySeasons wrote: ↑Tue Nov 21, 2023 3:58 am
I tried the password mask thing and it says "invalid syntax"
Which Renpy version are you using? Because it's pretty valid and works like a charm on my end.
I'm not sure why you are using a complicated way like creating an Input object and then adding it as a Displayable, while Renpy supports using the syntax I provided. Here you can read about the "input" keyword for screens: https://www.renpy.org/doc/html/screens.html#input
Also is there a way to disable the enter key when inputting the wrong password? Because whenever I do press enter instead of the button, it triggers the welcome page instead of "WRONG PASSWORD"