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.
-
zoranac
- Newbie
- Posts: 11
- Joined: Fri Aug 31, 2012 4:39 pm
- Projects: Forest's Sorrow
-
Contact:
#1
Post
by zoranac » Sun Sep 02, 2012 1:12 am
I have a game that tracks the phone numbers of various girls and at this one point, gives the player a choice of which one to call.
the problem is this format of the code doesn't work. It complains about the "if" statement.
Code: Select all
menu:
if knum == True:
"Call Kyra":
jump callkyra
if enum == True:
"Call Emi":
jump callemi
if snum == True:
"Call Skyler":
jump callskyler
if fnum == True:
"Call Faith":
jump callfaith
if rnum == True:
"Call Rose":
jump callrose
I want to know if there is a way of doing this without listing all the possible combinations...
thanks
-
Minnfae
- Regular
- Posts: 106
- Joined: Mon Dec 07, 2009 5:01 am
- Projects: Undecided
-
Contact:
#2
Post
by Minnfae » Sun Sep 02, 2012 2:02 am
You have to write the if statement after the choice.
Code: Select all
menu:
"Call Kyra" if knum:
jump callkyra
"Call Emi" if enum:
jump callemi
"Call Skyler" if snum:
jump callskyler
"Call Faith" if fnum:
jump callfaith
"Call Rose" if rnum:
jump callrose
My avatar art is a freebie by SilverHyena. Thanks a lot!
-
zoranac
- Newbie
- Posts: 11
- Joined: Fri Aug 31, 2012 4:39 pm
- Projects: Forest's Sorrow
-
Contact:
#3
Post
by zoranac » Sun Sep 02, 2012 4:24 pm
I'll Try this out! Thanks!