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.
-
AlienDucky
- Newbie
- Posts: 3
- Joined: Sun Jul 26, 2020 12:58 pm
-
Contact:
#1
Post
by AlienDucky » Thu Aug 06, 2020 8:49 am
I have four paths a player could take in my game in any order, and the player is only going to get to do three of them before something different happens on the fourth day.
I'm able to set three of the paths as variables using:
Code: Select all
label forest:
if days == 1:
$ choice_1 = 'forest'
if days == 2:
$ choice_2 = 'forest'
if days == 3:
$ choice_3 = 'forest'
scene bg_forest
show player at left
$ forest -= 1
$ daypts += 11'
on each of the four paths, but when I then try to set choice 4 at the end of the third day using:
Code: Select all
label end_of_day_three:
scene bg_inside_house
$ day3pts = daypts
if 'forest' == 1:
$ choice_4 = 'forest'
elif 'waterfall' == 1:
$ choice_4 = 'waterfall'
elif 'castle' == 1:
$ choice_4 = 'castle'
elif 'caves' == 1:
$ choice_4 = 'caves'
n "Oooooh! My feet hurt after looking around [choice_3] all day."
n "But I've still got the [choice_4] left to explore, so it's time for me to turn the lights off..."
jump day_four
I get nothing
I made that screen in the corner to help me keep track, so I can see caves = 1 and so should be turning into choice_4. Right?
All other inserted variables are showing up as they should
Last edited by
AlienDucky on Thu Aug 06, 2020 9:38 am, edited 1 time in total.
-
IrinaLazareva
- Veteran
- Posts: 399
- Joined: Wed Jun 08, 2016 1:49 pm
- Projects: Legacy
- Organization: SunShI
- Location: St.Petersburg, Russia
-
Contact:
#2
Post
by IrinaLazareva » Thu Aug 06, 2020 9:13 am
It's not quite clear, but..
if 'forest' ('waterfall' / 'castle' / 'caves' ) is variable, it should be unquoted:
if 'forest' is a value of another variable, for example,
choice_0, it should be:
-
AlienDucky
- Newbie
- Posts: 3
- Joined: Sun Jul 26, 2020 12:58 pm
-
Contact:
#3
Post
by AlienDucky » Thu Aug 06, 2020 9:24 am
It was the first one thank you!!
Users browsing this forum: Bing [Bot]