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.
neometalero
Regular
Posts: 196 Joined: Sun Oct 23, 2016 3:51 am
Completed: My Dream Sport Dating Simulator, Attack Helicopter Dating Simulator
Projects: My Dream Sport Dating Simulator, Attack Helicopter Dating Simulator
Deviantart: neometalero
Contact:
#1
Post
by neometalero » Wed Aug 04, 2021 10:16 am
Im working on this imagebutton but im not sure of the syntax to include the
Code: Select all
$ persistent.gallery_1_list[0][1] = 0
or to make the screen hide at the end of the action.
Code: Select all
screen HidImg01:
imagebutton:
xpos 1558
ypos 242
idle "HidImgPoints/HIm01.png"
hover "HidImgPoints/HIm01Hov.png"
action [Play("sound", "sounds/Unlock.mp3"),renpy.hide("HidImg01"), $ persistent.gallery_1_list[0][1] = 0, renpy.hide_screen("HidImg01")]
The unlock sound works just fine when it's just
Code: Select all
action [Play("sound", "sounds/Unlock.mp3"),renpy.hide("HidImg01")]
hell_oh_world
Miko-Class Veteran
Posts: 777 Joined: Fri Jul 12, 2019 5:21 am
Contact:
#2
Post
by hell_oh_world » Wed Aug 04, 2021 11:54 am
Code: Select all
action [Play("sound", "sounds/Unlock.mp3"), SetDict(persistent.gallery_1_list[0], 1, 0), Hide("HidImg01")]
neometalero
Regular
Posts: 196 Joined: Sun Oct 23, 2016 3:51 am
Completed: My Dream Sport Dating Simulator, Attack Helicopter Dating Simulator
Projects: My Dream Sport Dating Simulator, Attack Helicopter Dating Simulator
Deviantart: neometalero
Contact:
#3
Post
by neometalero » Wed Aug 04, 2021 12:10 pm
hell_oh_world wrote: ↑ Wed Aug 04, 2021 11:54 am
Code: Select all
action [Play("sound", "sounds/Unlock.mp3"), SetDict(persistent.gallery_1_list[0], 1, 0), Hide("HidImg01")]
Tks! that worked great!