- May 10, 2023
- 62
- 67
(in-long) Hey been stuck with this pesky secret gallery for days now and my ape brain cannot figure out how could i solve it I've tried with soo many forum codes but I couldn't really figure out. Also i have no idea that why I've put the code like this as i have no programming background at all. I just crafted things together which I've found online
(in-short) Whenever the button is pressed you should unlock an image but if i put the show/hide into the button action its doesnt work. The way my code works at the moment that it gives you the picture even if you didnt click the button.
The code:
secret_gallery.rpy
image special1 = "blabla.png"
init python:
gallery = Gallery()
gallery.button("special1")
gallery.unlock_image("special1")
gallery.locked_button = ("blablalocked.png")
screen secret_gallery:
tag menu
hbox:
xalign 0.5
yalign 0.1
spacing 30
add gallery.make_button(name="special1" ,unlocked="blabla.png")
script.rpy
default secret_button1 = False
screen secret_button():
add "blabla.png"
if not secret_button1:
imagebutton:
focus_mask True
idle "blabla_idle.png"
hover "blabla_hover.png"
action [ToggleScreen("secret_button"), Return()]
(later in code)
$ renpy.display_notify("Special render available")
show screen secret_button
show special1
hide special1
mc "blablablaalala"
hide screen secret_button
(in-short) Whenever the button is pressed you should unlock an image but if i put the show/hide into the button action its doesnt work. The way my code works at the moment that it gives you the picture even if you didnt click the button.
The code:
secret_gallery.rpy
image special1 = "blabla.png"
init python:
gallery = Gallery()
gallery.button("special1")
gallery.unlock_image("special1")
gallery.locked_button = ("blablalocked.png")
screen secret_gallery:
tag menu
hbox:
xalign 0.5
yalign 0.1
spacing 30
add gallery.make_button(name="special1" ,unlocked="blabla.png")
script.rpy
default secret_button1 = False
screen secret_button():
add "blabla.png"
if not secret_button1:
imagebutton:
focus_mask True
idle "blabla_idle.png"
hover "blabla_hover.png"
action [ToggleScreen("secret_button"), Return()]
(later in code)
$ renpy.display_notify("Special render available")
show screen secret_button
show special1
hide special1
mc "blablablaalala"
hide screen secret_button