Hello I need your help! This thing worked for me before, but after I've lost all of my pc data and went to code anew it didn't work. I want "Enter name" and "Lilith" below it to be in the center of the screen like in a nvl mode, but for all the rest of the text I want it to be in ADV style.
define l = Character("[pov]", color="#CA170C")
label start:
$ pov = renpy.input("Enter name", default='Lilith', allow="", exclude='{}', length=None, with_none=None, pixel_width=None, mask=None, copypaste=True, multiline=False,) or "Lilith"
$ pov.strip()
What do I need to add to the code so it gets in the center of the screen. I've tried many things, but they all failed.
Enter character name code in nvl mode
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.
Re: Enter character name code in nvl mode
renpy.input uses screen input(screens.rpy)
You can change this screen to fit your needs, for example:
EDIT:
Code: Select all
screen input(prompt):
style_prefix "input"
frame:
yalign 0.5
background "#888"
vbox:
xanchor gui.dialogue_text_xalign
xpos gui.dialogue_xpos
xsize gui.dialogue_width
ypos gui.dialogue_ypos
text prompt style "input_prompt"
input id "input"
Last edited by _ticlock_ on Sun May 28, 2023 4:59 pm, edited 1 time in total.
Re: Enter character name code in nvl mode
When I tried it I got an error I am sorry, my skills are quite low so if you could please explain what am I doing wrong_ticlock_ wrote: ↑Sat May 27, 2023 7:27 pmrenpy.input uses screen input(screens.rpy)
You can change this screen to fit your needs, for example:Code: Select all
screen input(prompt): style_prefix "input" frame: yalign 0.5 background "#888" vbox: xalign gui.dialogue_text_xalign xpos gui.dialogue_xpos xsize gui.dialogue_width ypos gui.dialogue_ypos text prompt style "input_prompt" input id "input"
Code: Select all
I'm sorry, but errors were detected in your script. Please correct the
errors listed below, and try again.
File "game/screens.rpy", line 184: keyword argument 'xpos' is incompatible with 'xalign'.
xpos gui.dialogue_xpos
^
Ren'Py Version: Ren'Py 8.1.0.23051307
Sun May 28 11:48:48 2023
Re: Enter character name code in nvl mode
As the error message says, you can't use both xalign and xpos. Just delete "xalign" line. You can check the original screen input in the standard file "screens.rpy", and the style parameters in file "gui.rpy".
If the problem is solved, please edit the original post and add [SOLVED] to the title.
Re: Enter character name code in nvl mode
Right. I copied it from an older version. jeffster is correct. You can replace xalign to xanchor to fix the error. I edited the code above._LadyBex_ wrote: ↑Sun May 28, 2023 5:51 amCode: Select all
File "game/screens.rpy", line 184: keyword argument 'xpos' is incompatible with 'xalign'. xpos gui.dialogue_xpos
Note: You don't need to use default style properties, you can change them to ones you actually need. It was just an example.
Re: Enter character name code in nvl mode
Thank you all it works fine now
Who is online
Users browsing this forum: No registered users