imagebutton action invalid syntax

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
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:

imagebutton action invalid syntax

#1 Post by neometalero »

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")]
Working on many weird narrative games at Curse Box Studios
Image
https://www.curseboxstudios.com/

User avatar
hell_oh_world
Miko-Class Veteran
Posts: 777
Joined: Fri Jul 12, 2019 5:21 am
Contact:

Re: imagebutton action invalid syntax

#2 Post by hell_oh_world »

Code: Select all

action [Play("sound", "sounds/Unlock.mp3"), SetDict(persistent.gallery_1_list[0], 1, 0), Hide("HidImg01")]

User avatar
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:

Re: imagebutton action invalid syntax

#3 Post by neometalero »

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!
Working on many weird narrative games at Curse Box Studios
Image
https://www.curseboxstudios.com/

Post Reply

Who is online

Users browsing this forum: Google [Bot], trailsiderice