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.
-
Raviel
- Newbie
- Posts: 6
- Joined: Tue Apr 12, 2016 4:40 am
-
Contact:
#1
Post
by Raviel » Fri Apr 15, 2016 5:16 am
Hi! I'm trying to make a choice_screen for my game through python: but it keeps crashing.
Code: Select all
result = [(kiss[1][1][0].text, 'renpy.jump("start")', ''), (kiss[1][1][1].text, 'renpy.jump("home_scene")', ''), (kiss[1][1][2].text, 'renpy.jump("school_scene")', '')]
renpy.call_screen('choice', items=result)
I get to make the choice but it crashes because: "TypeError: 'str' object is not callable" but if I leave out the quotations it messes up in other ways.
I appreciate all help I can get!
-
xela
- Lemma-Class Veteran
- Posts: 2481
- Joined: Sun Sep 18, 2011 10:13 am
-
Contact:
#2
Post
by xela » Fri Apr 15, 2016 5:44 am
Try:
Code: Select all
result = [(kiss[1][1][0].text, Jump("Start"), ''), (kiss[1][1][1].text, Jump("home_scene"), ''), (kiss[1][1][2].text, Jump("school_scene"), '')]
renpy.call_screen('choice', items=result)
Like what we're doing? Support us at:

-
Raviel
- Newbie
- Posts: 6
- Joined: Tue Apr 12, 2016 4:40 am
-
Contact:
#3
Post
by Raviel » Fri Apr 15, 2016 7:06 am
That's amazing, it worked thank you!
Now to another part of the problem. If I would like the action to be "$ option = 1" instead of jumping to another scene? What would I have to write? Maybe I should ask if it's possible first, hehe?
-
xela
- Lemma-Class Veteran
- Posts: 2481
- Joined: Sun Sep 18, 2011 10:13 am
-
Contact:
#4
Post
by xela » Fri Apr 15, 2016 7:12 am
Ask the good, old
Doc about screen actions, they are very straight forward.
Like what we're doing? Support us at:

-
Raviel
- Newbie
- Posts: 6
- Joined: Tue Apr 12, 2016 4:40 am
-
Contact:
#5
Post
by Raviel » Fri Apr 15, 2016 7:39 am
Huh, I have never come across this doc before. It helped, everything works now. Thank you!
Users browsing this forum: Bing [Bot], Hojoo