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.
I'm trying to make a sort of tarot card reading thing where you can select different cards and then the card will "flip" over to show you what you got, but I can't seem to get it working.
$ tarot = renpy.call_screen("reading")
if tarot == 1:
show card1:
xalign 0.315
yalign 0.2
with dissolve
if tarot == 2:
show card2:
xalign 0.685
yalign 0.2
with dissolve
if tarot == 3:
show card3:
xalign 0.5
yalign 0.7
with dissolve
Last edited by 4listair on Thu Aug 16, 2018 5:26 pm, edited 1 time in total.
Rather than calling the screen directly through python, you could use the renpy "call screen" function and then use the "_return" variable to read the returned value. Also you should use the "elif" conditional statement for the second and third tests to absolutely ensure that only one card is chosen at a time (even though, logically, no more than one of the conditions should be meet in a single instant).