[SOLVED] Help on calling a 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
User avatar
CalixtheGreat
Regular
Posts: 72
Joined: Thu Jun 08, 2017 12:00 am
Projects: Zephyr Breeze Investigations
itch: calixthegreat
Location: Philippines
Contact:

[SOLVED] Help on calling a label.

#1 Post by CalixtheGreat »

First of all, sorry for my grammar. 😣

I just need help with this:

Code: Select all

label start:
$english= False
$math= False
$history= False

label study:
scene black

"What would you like to talk about?"

menu:
  "English":
     $english =True
     "English is ..."
      jump study

  "Math":
     $math = True
     "Math is ..."
      jump study

  "History":
     $history = True
     " History is ..."
     jump study


And if all of them are true. I want to call this label:

Code: Select all

label complete:
  "Oh. We finished all the subjects."

Is it possible? Sorry if it's a dumb question.

Once again, sorry for my bad English. Thanks in advance for the respond. :)
Last edited by CalixtheGreat on Mon Jul 17, 2017 11:07 pm, edited 1 time in total.

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

Re: Help on calling a label.

#2 Post by Imperf3kt »

This isn't strictly your fault, I partially blame the wiki...

Try this

Code: Select all

default english = False
default math = False
default history = False

label start:
# You can start at study if you want

label study:
    scene black
    if english and math and history:
        "Oh. We finished all the subjects."
        jump continue
    else:

        "What would you like to talk about?"

        menu:
            "English":
                $ english = True
                "English is ..."
                jump study

            "Math":
                $ math = True
                "Math is ..."
                jump study

            "History":
                $ history = True
                "History is ..."
                jump study

label continue:
    # blah blah blah
    
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.

Current project: GGD Mentor

Twitter

User avatar
CalixtheGreat
Regular
Posts: 72
Joined: Thu Jun 08, 2017 12:00 am
Projects: Zephyr Breeze Investigations
itch: calixthegreat
Location: Philippines
Contact:

Re: Help on calling a label.

#3 Post by CalixtheGreat »

Thank you so much for this! :D

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Bing [Bot]