I'm having trouble getting this segment to work. The trouble is through line 9 and 13. Can anyone help me?
label start:
$ scene_points = 0
$ person_points = 0
$ time_points = 1
label scene_1:
if person_points = 0:
jump scene_2
if person_points = 1:
jump Aidan_3
label scene_2:
"Random dialogue."
$ time_points += 1
menu:
"Answer 1":
"More dialogue"
jump scene_1
"Answer 2":
"More dialogue"
$ Aidan_points += 1
jump scene_1
label scene_3:
"This is scene 2!"
return
Point based jumps?
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.
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.
-
- Regular
- Posts: 55
- Joined: Mon Jan 13, 2014 11:46 pm
- Contact:
Re: Point based jumps?
Well, it's hard to tell if there are any indentation errors from what you posted, but all the if statements should have two = signs:
Code: Select all
if person_points == 0:
jump scene_2
-
- Eileen-Class Veteran
- Posts: 1258
- Joined: Fri Sep 21, 2007 7:13 am
- Projects: a battle engine
- Contact:
Re: Point based jumps?
First of all, in the future you should use tags when pasting code so that the indenting is preserved, since indenting is important in ren'py and python and can lead to subtle bugs.
This probably isn't your problem though. The problem is that you are using = instead of ==. Use = for assignment, == for comparison.
a = b means a is set to b
a == b means comparing if a is equal to b.
Code: Select all
This probably isn't your problem though. The problem is that you are using = instead of ==. Use = for assignment, == for comparison.
a = b means a is set to b
a == b means comparing if a is equal to b.
-
- Regular
- Posts: 55
- Joined: Mon Jan 13, 2014 11:46 pm
- Contact:
Re: Point based jumps?
I'm sorry. I'm a bit new on this forum. Thank you for the help!
Who is online
Users browsing this forum: Google [Bot], Houseofmine, Lacha