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.
if i == 0:
vbox xalign 0.99 yalign 0.01:
imagebutton 1
else:
vbox xalign 0.99 yalign 0.01:
imagebutton 2
Either way, I need to throw a bunch of "$renpy.pause(hard=True)" in this label, to avoid the bug of returning to the main menu.
Hope I explained it well!
Have you tried making a blank project and just testing out your code idea before asking? Because I just made a screen with if/else just as you described and it worked no problem. So try things out!
Anyway, I want to address your comment about the bug of returning to the main menu. That isn't a bug. That is a misunderstanding of what screens are.
Screens are not the story. They are just UI elements.
and if you give an empty block it is going to go back to the main menu. Not a bug.
Instead you should work on designing your game differently so that it isn't empty.
A Close Shave:
*Last Thing Done (Aug 17): Finished coding emotions and camera for 4/10 main labels.
*Currently Doing: Coding of emotions and camera for the labels--On 5/10
*First Next thing to do: Code in all CG and special animation stuff
*Next Next thing to do: Set up film animation
*Other Thing to Do: Do SFX and Score (maybe think about eye blinks?)