HOW CAN I MAKE LIKE THIS

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
User avatar
kucharaka
Newbie
Posts: 5
Joined: Sun Jan 06, 2019 1:00 pm
Contact:

HOW CAN I MAKE LIKE THIS

#1 Post by kucharaka »

I want to switch ingame menu modes by using var (if d == 1 - first pic, else 2 pic) how can I do this?
Attachments
2v.jpg
1v.jpg
Last edited by kucharaka on Mon Jan 07, 2019 4:45 pm, edited 1 time in total.

User avatar
xixikudo
Regular
Posts: 27
Joined: Wed May 30, 2018 3:07 am
Projects: WhiteNightRhapsody
Organization: NamelessElysion
Contact:

Re: HOW I CAN MAKE LIKE THIS

#2 Post by xixikudo »

Maybe you should look into screens.rpy and use some if statements.

User avatar
kucharaka
Newbie
Posts: 5
Joined: Sun Jan 06, 2019 1:00 pm
Contact:

Re: HOW I CAN MAKE LIKE THIS

#3 Post by kucharaka »

Can you help me with code?

User avatar
Imperf3kt
Lemma-Class Veteran
Posts: 3794
Joined: Mon Dec 14, 2015 5:05 am
itch: Imperf3kt
Location: Your monitor
Contact:

Re: HOW I CAN MAKE LIKE THIS

#4 Post by Imperf3kt »

Which menu is this for, exactly, and what are the functions of the buttons?
It's easily doable, but we'd need to know a bit more about everything, to help with it.
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.

Current project: GGD Mentor

Twitter

User avatar
kucharaka
Newbie
Posts: 5
Joined: Sun Jan 06, 2019 1:00 pm
Contact:

Re: HOW I CAN MAKE LIKE THIS

#5 Post by kucharaka »

Imperf3kt wrote: Sun Jan 06, 2019 5:35 pm Which menu is this for, exactly, and what are the functions of the buttons?
It's easily doable, but we'd need to know a bit more about everything, to help with it.
I want to make such a menu so that after changing a variable it is transferred from the first state to the second that is initially it was the same as in the first picture, and after changing the variable such as the second. And from you I would like to know how to implement it, or rather the code
Last edited by kucharaka on Mon Jan 07, 2019 4:46 pm, edited 1 time in total.

User avatar
kucharaka
Newbie
Posts: 5
Joined: Sun Jan 06, 2019 1:00 pm
Contact:

Re: HOW I CAN MAKE LIKE THIS

#6 Post by kucharaka »

Imperf3kt wrote: Sun Jan 06, 2019 5:35 pm Which menu is this for, exactly, and what are the functions of the buttons?
It's easily doable, but we'd need to know a bit more about everything, to help with it.
It's just a simple ingame menu with choices, i wanna switch modes (pic 1 to pic 2) by using variables (if d == 1 -> using first mode, if d == 0 -> using second mode)
Attachments
2v.jpg
1v.jpg

User avatar
Alex
Lemma-Class Veteran
Posts: 3094
Joined: Fri Dec 11, 2009 5:25 pm
Contact:

Re: HOW I CAN MAKE LIKE THIS

#7 Post by Alex »

Try something like this (might need some tweaking)

Code: Select all

screen choice(items):
    if d == 1:
        hbox:
            spacing 5
            xalign 0.5
            yalign 0.75
            for i in items:
                textbutton i.caption action i.action xsize (config.screen_width//5)

        
    elif d == 0:
        vbox:
            for i in items:
                textbutton i.caption action i.action
https://www.renpy.org/doc/html/style_pr ... properties

User avatar
kucharaka
Newbie
Posts: 5
Joined: Sun Jan 06, 2019 1:00 pm
Contact:

Re: HOW I CAN MAKE LIKE THIS

#8 Post by kucharaka »

Alex wrote: Mon Jan 07, 2019 4:04 pm Try something like this (might need some tweaking)

Code: Select all

screen choice(items):
    if d == 1:
        hbox:
            spacing 5
            xalign 0.5
            yalign 0.75
            for i in items:
                textbutton i.caption action i.action xsize (config.screen_width//5)

        
    elif d == 0:
        vbox:
            for i in items:
                textbutton i.caption action i.action
https://www.renpy.org/doc/html/style_pr ... properties
THANK YOU SO MUCH

Post Reply

Who is online

Users browsing this forum: No registered users