Creating a "form" for players to check

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.
Post Reply
Message
Author
K0torisan
Regular
Posts: 26
Joined: Fri Feb 16, 2018 10:21 pm
Contact:

Creating a "form" for players to check

#1 Post by K0torisan »

Hi! I'm not sure how to go about coding this and I'd like some help, please.

At the beginning of my game, I have players take a short quiz that tests for personality traits. The answers are split into a dichotomy, (you HAVE to pick either A or B), and right now it is coded as a series of menu options, like a regular choice menu.

For example (this isn't a real question in the game):

Code: Select all

"Do you prefer day or night?"
menu:
    "Day.":
        $ Trait_A +=1
    "Night.":
        $ Trait_B +=1
However, I would like to create a large "form" on the screen that players check off - so basically I want to turn the choice menu that renpy automatically formats into an image map with clickable boxes to answer the questions. I'd like for the boxes to remain "checked" while the player takes the quiz, just so they can see which answers they have selected, and then "submit" the form all at once. I've worked with imagemaps before, but I'm lost on how I would go about writing this into the script.

If anyone can help me on this, I would be very grateful! Thank you!

User avatar
gas
Miko-Class Veteran
Posts: 842
Joined: Mon Jan 26, 2009 7:21 pm
Contact:

Re: Creating a "form" for players to check

#2 Post by gas »

Use call screen to call a screen,full of buttons that SetVariable, with just one that instead just Return(),this one have execution proceed. Called screen stop execution until something Return.
If you want to debate on a reply I gave to your posts, please QUOTE ME or i'll not be notified about. << now red so probably you'll see it.

10 ? "RENPY"
20 GOTO 10

RUN

K0torisan
Regular
Posts: 26
Joined: Fri Feb 16, 2018 10:21 pm
Contact:

Re: Creating a "form" for players to check

#3 Post by K0torisan »

gas wrote: Wed Mar 28, 2018 9:34 am Use call screen to call a screen,full of buttons that SetVariable, with just one that instead just Return(),this one have execution proceed. Called screen stop execution until something Return.
Maybe this is a silly question, but can I slap all the code for the screen in the script.rpy file, or do I need to first define it somewhere in screens.rpy?

Post Reply

Who is online

Users browsing this forum: Bing [Bot]