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.
label pic_violet:
show screen pic_violet(vhslog)
$ vhslog.add_chat(msg="Wow :O", nick="Wolfie", avatar="images/avatars/wolfie.png", posttime="1 day ago") ## previous comments you can read
$ vhslog.add_chat(msg="OMG you can draw so much better than me XD", nick="Markus", avatar="images/avatars/markus.png", posttime="1 day ago")
$ vhslog.add_chat(msg="Haha ;-)", nick="Lindsay222", avatar="images/avatars/lindsay.png", posttime="1 day ago")
$ choice_items1 = ["Wow!", "I love it!", "Meh"] # I want these choice to show when/if the player clicks the post button
pause
screen write_post(items): ## the custom choice screen I want to use here
add "images/write_post.png" xpos 454 ypos 190
text _("Write Post") color "#000000" xpos 890 ypos 202
default picked = None
if not picked:
vbox:
xpos 660
ypos 350
label "Select:"
vbox:
for i in items:
textbutton i:
action SetScreenVariable("picked", i)
style "black_text"
else picked:
hbox:
xpos 662
ypos 732
spacing 40
vbox:
text _("Send '[picked]' as the post message?")
hbox:
textbutton "Yes" action [Function(vhslog.add_chat, msg=picked, nick="Markus", avatar="images/avatars/markus.png", posttime="Just now"), Hide("write_post")]
textbutton "No" action SetScreenVariable("picked", None)
label pic_violet:
show screen pic_violet(vhslog)
$ vhslog.add_chat(msg="Wow :O", nick="Wolfie", avatar="images/avatars/wolfie.png", posttime="1 day ago") ## previous comments you can read
$ vhslog.add_chat(msg="OMG you can draw so much better than me XD", nick="Markus", avatar="images/avatars/markus.png", posttime="1 day ago")
$ vhslog.add_chat(msg="Haha ;-)", nick="Lindsay222", avatar="images/avatars/lindsay.png", posttime="1 day ago")
show screen write_post(["Wow!", "I love it!", "Meh"])
pause
screen write_post(items): ## the custom choice screen I want to use here
add "images/write_post.png" xpos 454 ypos 190
text _("Write Post") color "#000000" xpos 890 ypos 202
default picked = None
if not picked:
vbox:
xpos 660
ypos 350
label "Select:"
vbox:
for i in items:
textbutton i:
action SetScreenVariable("picked", i)
style "black_text"
else picked:
hbox:
xpos 662
ypos 732
spacing 40
vbox:
text _("Send '[picked]' as the post message?")
hbox:
textbutton "Yes" action [Function(vhslog.add_chat, msg=picked, nick="Markus", avatar="images/avatars/markus.png", posttime="Just now"), Hide("write_post")]
textbutton "No" action SetScreenVariable("picked", None)
label pic_violet:
show screen pic_violet(vhslog)
$ vhslog.add_chat(msg="Wow :O", nick="Wolfie", avatar="images/avatars/wolfie.png", posttime="1 day ago") ## previous comments you can read
$ vhslog.add_chat(msg="OMG you can draw so much better than me XD", nick="Markus", avatar="images/avatars/markus.png", posttime="1 day ago")
$ vhslog.add_chat(msg="Haha ;-)", nick="Lindsay222", avatar="images/avatars/lindsay.png", posttime="1 day ago")
show screen write_post(["Wow!", "I love it!", "Meh"])
pause
Thank you, though I really need a button instead of "show screen write_post(["Wow!", "I love it!", "Meh"])" coming up automatically.
I thought maybe I could jump to a label with this code using the button, but even when I set it all up, the choices/ items are not there
label pic_violet_hanzo_sword:
show screen pic_violet_hanzo_sword(vhslog)
$ vhslog.add_chat(msg="Wow :O", nick="Wolfie", avatar="images/avatars/wolfie.png", posttime="1 day ago")
$ vhslog.add_chat(msg="OMG you can draw so much better than me XD", nick="Markus", avatar="images/avatars/markus.png", posttime="1 day ago")
$ vhslog.add_chat(msg="Haha ;-)", nick="Lindsay222", avatar="images/avatars/lindsay.png", posttime="1 day ago")
pause
label vhs_post:
show screen write_post(["Wow!", "I love it!", "Meh"])
pause