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.
Hi guys!
I'm trying to make a quest diary, but the problem I'm having is that I'd like to show some text (taken from a dictionary) inside a frame when I click on a textbutton. Here is an image that shows what I'd like to do:
screen quest_screen:
frame:
xpos 150
ypos 100
hbox:
frame:
vbox:
textbutton "Quest 1" action [take the quest 1 text from a dictionary and show inside the frame below]
textbutton "Quest 2" action [take the quest 2 text from a dictionary and show inside the frame below]
frame:
text"Suppose clicked on Quest 1, here should appear a description of the quest."
What is the action I should use? Is there a different approach to solve this problem? I suspect that it's much more complicated than I think
Thanks
default quest_dict = {"q1":"This is the description of Quest 1",
"q2":"This is the description of Quest 2"}
screen quest_screen():
default quest_text = None
frame:
xpos 150
ypos 100
hbox:
frame:
vbox:
textbutton "Quest 1" action SetScreenVariable("quest_text", quest_dict["q1"])
textbutton "Quest 2" action SetScreenVariable("quest_text", quest_dict["q2"])
frame:
text"[quest_text]"
label start:
"Test Start"
show screen quest_screen()
"End Test"
"Game Over"
return
A Close Shave:
*Last Thing Done (Aug 17): Finished coding emotions and camera for 4/10 main labels.
*Currently Doing: Coding of emotions and camera for the labels--On 5/10
*First Next thing to do: Code in all CG and special animation stuff
*Next Next thing to do: Set up film animation
*Other Thing to Do: Do SFX and Score (maybe think about eye blinks?)