This is probably extremely basic stuff, but I can't find exactly what I'm looking for with the tutorials. Thank you in advance!
The layout of our game is set up like this. There are 40 scenes, with 3 routes. 10 scenes per character, and 10 main scenes. It goes like this:
Main Scene 1 - > (choose which route, A, B, or C. for example, A) -> A Scene 1 -> Main Scene 2 ->A Scene 2 -> Main Scene 3 -> A Scene 3, etc etc.
So, each time you play the game, you can choose to "follow" any of the three characters. Your first choice determines how the rest of your playthrough goes, though all 3 routes share the same "main" scenes.
This is the menu that makes the first big decision:
menu:
"Follow Beverly":
jump b01
"Follow Casey":
jump c01
"Follow Gregory":
jump t01
What sort of "if" statement would I put in, and where? Before the label start, after? Sorry if this is very basic, I'm still learning and having trouble finding information. Thank you so much!
Help with "if" statements?
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.
- Remix
- Eileen-Class Veteran
- Posts: 1628
- Joined: Tue May 30, 2017 6:10 am
- Completed: None... yet (as I'm still looking for an artist)
- Projects: An un-named anime based trainer game
- Contact:
Re: Help with "if" statements?
You wouldn't need an if, you'd just want a variable...
P.S. In future wrap your code in formatting tags:
[code]Your code here[/code]
Hope that makes sense
P.S. In future wrap your code in formatting tags:
[code]Your code here[/code]
Code: Select all
default chosen_route = "bev"
label start:
menu:
"Follow Beverly":
$ chosen_route = "bev"
"Follow Casey":
$ chosen_route = "cas"
"Follow Gregory":
$ chosen_route = "greg"
jump expression "{}_scene_1".format( chosen_route )
#
# the expression bit just says evaluate it, the {} is replaced by the route
label bev_scene_1:
"This shows if we chose Beverley"
jump main_scene_1
label main_scene_1:
"some stuff"
jump expression "{}_scene_2".format( chosen_route ) # onto route scene 2...
Frameworks & Scriptlets:
- Speech Bubble dialogue system
- Multiple Notify with ATL and history
- (WIP) Radial Masking - needs updating to use Shader
- 7.4 - Smooth Tinting using ATL and matrixcolor
- Several other repositories there too
Re: Help with "if" statements?
That's perfect, thank you so much! We were able to get the whole thing coded right, woohoo.
Who is online
Users browsing this forum: Ahrefs [Bot], Andredron, Google [Bot]