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.
textbutton l["place"] action [Show("location_photo", photo=l["photo"]), Show("icon_photo", icon=l["icon"]), Show("sub_location_list",actions=l["actions_list"])]
$ data = ["place":"Shinjuku", "photo":"shinjuku_photo", "icon":"shomonkai_icon", "actions_list":"list of actions"]
# The data for this last line might not be correct, I'm just pulling it from a larger nested structure and it's not important to my question I think.
I have this textbutton in my code that displays a photo, an icon, and a list of actions based on which location name the player clicks on. However, only some of the locations have an icon, and for the rest I want to just display the photo and list of actions.
Is there a way I can do this, maybe using if/then statements? I want to have conditions where no icon is shown.
Last edited by TellerFarsight on Sun Jun 25, 2017 11:19 am, edited 1 time in total.