How can I skip the use of a second label?

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.
Post Reply
Message
Author
Flashlight
Newbie
Posts: 7
Joined: Tue Jan 05, 2016 8:32 am
Contact:

How can I skip the use of a second label?

#1 Post by Flashlight » Fri Sep 08, 2017 6:55 pm

Hi so I'm trying to have two options of dialogue for the user to choose from.
I would like for them to choose option 1 but when it is chosen it also reads the dialogue for label 2.
How can I stop it from reading the second label and continuing on with the story?

menu:
"Stay quiet.":
jump a1

"Demand who's speaking.":
jump a2

label a1:
"Sam sits quietly for a moment."


label a2:
s "W-whos there?"

If jump one is chosen it will read label 1 but label 2 as well. Please help!

User avatar
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: How can I skip the use of a second label?

#2 Post by Remix » Fri Sep 08, 2017 7:08 pm

label a1:
... "Sam sits quietly for a moment."
... return

most labels should have 'return' at the end unless they jump elsewhere and never return
Frameworks & Scriptlets:

Flashlight
Newbie
Posts: 7
Joined: Tue Jan 05, 2016 8:32 am
Contact:

Re: How can I skip the use of a second label?

#3 Post by Flashlight » Fri Sep 08, 2017 7:17 pm

Remix wrote:
Fri Sep 08, 2017 7:08 pm
label a1:
... "Sam sits quietly for a moment."
... return

most labels should have 'return' at the end unless they jump elsewhere and never return
Using return ends the game for me at that point.
I want it to continue but without using label 2.
Am I using command or?...

User avatar
Imperf3kt
Lemma-Class Veteran
Posts: 3636
Joined: Mon Dec 14, 2015 5:05 am
Location: Your monitor
Contact:

Re: How can I skip the use of a second label?

#4 Post by Imperf3kt » Fri Sep 08, 2017 8:01 pm

If you have two labels, one after the other, with no return, jump or call between them, then the game will move between them as if nothing happened.

The solution is dependant on how you structured your game.
Sounds like you want to jump over label b, so just write jump label_c at the end of the a label
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.

Current project: GGD Mentor
Free Android GUI - Updated occasionally
Twitter
Imperf3kt Blackjack - a WIP blackjack game for Android made using Ren'Py

Flashlight
Newbie
Posts: 7
Joined: Tue Jan 05, 2016 8:32 am
Contact:

Re: How can I skip the use of a second label?

#5 Post by Flashlight » Fri Sep 08, 2017 8:21 pm

Imperf3kt wrote:
Fri Sep 08, 2017 8:01 pm
If you have two labels, one after the other, with no return, jump or call between them, then the game will move between them as if nothing happened.

The solution is dependant on how you structured your game.
Sounds like you want to jump over label b, so just write jump label_c at the end of the a label
Ah ha! Problem solved!!! Thank you so much!

Post Reply

Who is online

Users browsing this forum: Ocelot