Hey there!
I am using https://nighten.itch.io/yet-another-phone-renpy in my game, making the NVL screen being formated as a phone screen. So i wanted to create a image button on the top left corner that can activate and deactivate the nvl mode, as it's pushing and pulling the phone away.
I am new to Ren'py and Python so I really do not know how to code it or in which file i should try coding it.
[SOLVED] Button that activates 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.
[SOLVED] Button that activates NVL mode
Last edited by gecco on Mon Apr 10, 2023 8:21 pm, edited 1 time in total.
Re: Button that activates NVL mode
It depends on what you want to do with this system. Here is a possible example.gecco wrote: ↑Sun Apr 09, 2023 9:09 pm Hey there!
I am using https://nighten.itch.io/yet-another-phone-renpy in my game, making the NVL screen being formated as a phone screen. So i wanted to create a image button on the top left corner that can activate and deactivate the nvl mode, as it's pushing and pulling the phone away.
I am new to Ren'py and Python so I really do not know how to code it or in which file i should try coding it.
Code: Select all
screen phone_button:
imagebutton:
...
action Call("phone_msg")
label start:
show screen phone_button
...
label phone_msg:
# Here is your nvl phone dialogue.
# Possibly, you want some variables that would track what is supposed to be shown here.
Re: Button that activates NVL mode
Thank you so much!!! I'll try it out!
Last edited by gecco on Mon Apr 10, 2023 3:01 pm, edited 1 time in total.
Using the button to show and hide NVL mode
Thank you! the button works, but I wanted to make it in a way that if I click again, it hide the NVL screen, like showing and hiding the phone. How can i do that?_ticlock_ wrote: ↑Sun Apr 09, 2023 10:30 pmIt depends on what you want to do with this system. Here is a possible example.gecco wrote: ↑Sun Apr 09, 2023 9:09 pm Hey there!
I am using https://nighten.itch.io/yet-another-phone-renpy in my game, making the NVL screen being formated as a phone screen. So i wanted to create a image button on the top left corner that can activate and deactivate the nvl mode, as it's pushing and pulling the phone away.
I am new to Ren'py and Python so I really do not know how to code it or in which file i should try coding it.
Code: Select all
screen phone_button: imagebutton: ... action Call("phone_msg") label start: show screen phone_button ... label phone_msg: # Here is your nvl phone dialogue. # Possibly, you want some variables that would track what is supposed to be shown here.
Re: Using the button to show and hide NVL mode
For example:
Code: Select all
screen phone_button:
default phone_on = False
imagebutton:
idle Solid("#f00", xysize=(100,100))
hover Solid("#f0f", xysize=(100,100))
# action If("phone_on", true = Return(), false=Call("phone_msg"))
if phone_on:
action SetScreenVariable("phone_on", False), Jump("phone_msg.end")
else:
action SetScreenVariable("phone_on", True), Call("phone_msg")
Code: Select all
label phone_msg:
...
label .end:
show screen phone_button # To reset phone_on to False
return
Who is online
Users browsing this forum: Bmac60506