Gallery question: multiple img w/ different condition - BUG?

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
saguaro
Miko-Class Veteran
Posts: 560
Joined: Sun Feb 12, 2012 9:17 am
Completed: Locked-In, Sunrise, The Censor
Organization: Lucky Special Games
itch: saguarofoo
Location: USA
Contact:

Gallery question: multiple img w/ different condition - BUG?

#1 Post by saguaro »

I am having some difficulties with an image gallery. The buttons are supposed to contain multiple images, one for each variation of the background.

Code: Select all

    g.button("Intro")
    g.condition("persistent.introextra01 or persistent.introextra02 or persistent.introextra03")
    g.image("introextra01")
    g.condition("persistent.introextra01")    
    g.image("introextra02")
    g.condition("persistent.introextra02")
    g.image("introextra03")
    g.condition("persistent.introextra03") 
Unfortunately, if the buttons are unlocked out of order (for example, the player encounters introextra02 first), the code will only display the placeholder text ("Image 01 of 03 is locked").

Unlocking 02 and 03 will result in showing the placeholder image and image 02.

I looked at 00gallery.rpy but I am not sure what change I could make to resolve this so the player can see any image based on a condition regardless of if the earlier images are unlocked. Can anyone advise?
Last edited by saguaro on Thu Apr 02, 2015 3:08 pm, edited 1 time in total.

User avatar
saguaro
Miko-Class Veteran
Posts: 560
Joined: Sun Feb 12, 2012 9:17 am
Completed: Locked-In, Sunrise, The Censor
Organization: Lucky Special Games
itch: saguarofoo
Location: USA
Contact:

Re: Gallery question - multiple images with different condit

#2 Post by saguaro »

Having done some testing, I believe this is a bug. In case anyone can help me find a workaround, I have attached a demo. Simply drop into a new project.

Note buttons 2, 3, and 6 -- all three return to the gallery screen after displaying the image 1 placeholder. The other buttons show all the unlocked images associated with that button.
Attachments
script.rpy
(5.74 KiB) Downloaded 89 times

Post Reply

Who is online

Users browsing this forum: No registered users