setting a Desicion
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.
-
- Newbie
- Posts: 11
- Joined: Fri Apr 14, 2017 7:49 am
- Location: Portugal, Germany
- Contact:
setting a Desicion
Hi here . . .
i have currently a Problem to make / set a Desicion in my Script, because i get everytime of the last 2 Hours an error Message, thats why i write now here and i hope you can help me.
Thats what i have / done at the Moment:
menu:
"I'm from Germany, Hamburg why?":
jump fromgermany
"You are really curios, right?":
jump reallycurios
label fromgermany:
Akiko "Wow! I know Hamburg just of Pictures."
return
label reallycurios:
Akiko "This is a part of my Business, to know my Recruts."
return
but i get everytime in the different way's i try the parsing the script failed, please help me, thanks
i have currently a Problem to make / set a Desicion in my Script, because i get everytime of the last 2 Hours an error Message, thats why i write now here and i hope you can help me.
Thats what i have / done at the Moment:
menu:
"I'm from Germany, Hamburg why?":
jump fromgermany
"You are really curios, right?":
jump reallycurios
label fromgermany:
Akiko "Wow! I know Hamburg just of Pictures."
return
label reallycurios:
Akiko "This is a part of my Business, to know my Recruts."
return
but i get everytime in the different way's i try the parsing the script failed, please help me, thanks
- Potato0095
- Regular
- Posts: 84
- Joined: Sun May 08, 2016 8:40 pm
- Projects: LoveCraft
- itch: potato95
- Location: Brazil
- Contact:
Re: setting a Desicion
Try this one.
Use Atom, it's way easier for newbies like you and me.
Code: Select all
menu:
"I'm from Germany, Hamburg why?":
jump fromgermany
"You are really curios, right?":
jump reallycurios
label fromgermany:
Akiko "Wow! I know Hamburg just of Pictures."
return
label reallycurios:
Akiko "This is a part of my Business, to know my Recruts."
return
"There are two types of lies: Lies that hurt, and lies that don't."
-
- Newbie
- Posts: 11
- Joined: Fri Apr 14, 2017 7:49 am
- Location: Portugal, Germany
- Contact:
Re: setting a Desicion
This is not really a Help, but thanks
- Potato0095
- Regular
- Posts: 84
- Joined: Sun May 08, 2016 8:40 pm
- Projects: LoveCraft
- itch: potato95
- Location: Brazil
- Contact:
Re: setting a Desicion
Sorry, let me get rebooted here. Well, basically, you're writting without indentations. You can put one indentation with tab, they're used to group statements into blocks. You'll be using lots of them since they're very important, also, they'll give syntax or logical errors when it's incorrect. You can find it a better explanation here:
Indentation and blocks:
https://www.renpy.org/doc/html/language ... and-blocks
Common Statement Syntax
https://www.renpy.org/doc/html/language ... ent-syntax
Here's an example I made
Code: Select all
label start: # <-- the colon here starts a block
e "So, you're back huh?" # <-- Here I just hit tab one time
menu: # <-- Another colon, for the block
"Yes, I'm":
jump finally # <-- This jump is part of the answer "Yes, I'm", so I need to add a colon after an answer and write the line "inside" it (Also, see the indentation and blocks I linked ahead for better understanding)
"Of course!":
e "Hehe." # < -- I writed these two in the same block because they're both part of the answer, of course, I could've writed just the jump label, but I'm trying to show some of the basics here.
jump well
label finally: # < -- The label for the 1st answer.
e "You're not welcome here anymore." # < -- Since the say statement here is part of the block, I needed to tab, if I didn't, the game wouldn't work.
return
label well:
e "You made a serious mistake 2 years ago, and another one right now."
return
Label statement:
https://www.renpy.org/doc/html/label.ht ... -statement
Jump statement:
https://www.renpy.org/doc/html/label.ht ... -statement
As I said before, use Atom, it has many useful features, like auto-indentation itself.
"There are two types of lies: Lies that hurt, and lies that don't."
-
- Newbie
- Posts: 11
- Joined: Fri Apr 14, 2017 7:49 am
- Location: Portugal, Germany
- Contact:
Re: setting a Desicion
Hi there . . .
i have again a Problem, because i fixed my first and now i have the next about that.
The Process is running good, but if i come to the desicion to choose 1 or 2 and if i choose 1, i get the mormal Answer for 1, but after i get the Answer of the secound Choice too - how i can fix that ?
Thx so long
i have again a Problem, because i fixed my first and now i have the next about that.
Code: Select all
scene HQ
show Akiko at right
show Taro at left
Taro "Und wo befinden sich die Unterkünfte?"
Akiko "Die befinden sich im Westen der Insel, da dort auch die Schulungsräume sowie die Sportanlagen zu finden sind."
Akiko "Wohin möchtest Du zu erst?"
menu:
"Ich recht sportlich, daher würde ich mir gerne die Sportanlage anschauen.":
jump sportarea
"Ich würde gerne erst meine Sachen verstauen bevor wir mit der Führung weiter machen, geht das?":
jump livingarea
label sportarea:
Akiko "Sehr gerne, vielleicht haben wir ja Glück und bekommen das Training der ersten Flotte noch mit!"
label livingarea:
Akiko "Das kann ich sehr gut verstehen, der Flug wahr bestimmt sehr anstrengend."
Thx so long
- Potato0095
- Regular
- Posts: 84
- Joined: Sun May 08, 2016 8:40 pm
- Projects: LoveCraft
- itch: potato95
- Location: Brazil
- Contact:
Re: setting a Desicion
Well, that's normal for now, you didn't use the return statement, so Ren'Py assumes this is still part of the same asnwer.
Code: Select all
label sportarea:
Akiko "Sehr gerne, vielleicht haben wir ja Glück und bekommen das Training der ersten Flotte noch mit!"
return # < -- Use this when the game is done and you want to return to the main menu, if you don't, just use another jump or something similar.
Last edited by Potato0095 on Sat Jul 29, 2017 11:47 am, edited 1 time in total.
"There are two types of lies: Lies that hurt, and lies that don't."
-
- Newbie
- Posts: 11
- Joined: Fri Apr 14, 2017 7:49 am
- Location: Portugal, Germany
- Contact:
Re: setting a Desicion
Thanks Potato, but this is not really what i want, because the Context should jump normal after the Answer to the Location of my first desicion or if i choose the second to this, but if i wirte it so like the script it dosent work too . . .Potato0095 wrote: ↑Sat Jul 29, 2017 11:23 am Well, that's normal for now, you didn't use the return label, so Ren'Py assumes this is still part of the same asnwer.Code: Select all
label sportarea: Akiko "Sehr gerne, vielleicht haben wir ja Glück und bekommen das Training der ersten Flotte noch mit!" return # < -- Use this when the game is done and you want to return to the main menu, if you don't, just use another jump or something similar.
Code: Select all
menu:
"Ich recht sportlich, daher würde ich mir gerne die Sportanlage anschauen.":
jump sportarea
"Ich würde gerne erst meine Sachen verstauen bevor wir mit der Führung weiter machen, geht das?":
jump livingarea
label HQ1:
Akiko "Sehr gerne, vielleicht haben wir ja Glück und bekommen das Training der ersten Flotte noch mit!"
jump sportarea
label HQ2:
Akiko "Das kann ich sehr gut verstehen, der Flug war bestimmt sehr anstrengend."
jump livingarea
label sportarea:
scene Sport
show Akiko at right
show Taro at left
Akiki "Das hier ist die Sportanlage. Hier trainieren wir täglich 2 bis 3 Stunden für unsere Kondition und Beweglichkeit, sowie Zielgenauigkeit im Kampf."
Akiko "Leider haben wir kein Glück und können einer der höheren Klassen beim Training zu schauen, aber dafür wird es noch mehr als Genug Zeit geben."
Taro "Ein beeindruckendes Trainingsgelände habt Ihr hier, gefällt mir sehr gut. Alles da was man braucht, sehr schön."
-
- Newbie
- Posts: 11
- Joined: Fri Apr 14, 2017 7:49 am
- Location: Portugal, Germany
- Contact:
Re: setting a Desicion
Problem is fixed, Thanks *_*
- Potato0095
- Regular
- Posts: 84
- Joined: Sun May 08, 2016 8:40 pm
- Projects: LoveCraft
- itch: potato95
- Location: Brazil
- Contact:
Re: setting a Desicion
You're having problem with your jump right? I assume you want to jump to HQ1 or HQ2 depending on the answer and then go to "sportarea" or "livingarea", so I made some modifications on your script trying to fix your problem and I marked them with comments like I did before. If I misunderstood something here just let me know, I don't think I understood your problem clearly, sorry about it.
Code: Select all
menu:
"Ich recht sportlich, daher würde ich mir gerne die Sportanlage anschauen.":
jump HQ1 # < -- This will jump to the label HQ1, from there it'll jump for sportarea.
"Ich würde gerne erst meine Sachen verstauen bevor wir mit der Führung weiter machen, geht das?":
jump HQ2 # < -- This will jump to the label HQ2, from there it'll jump for livingarea.
label HQ1:
Akiko "Sehr gerne, vielleicht haben wir ja Glück und bekommen das Training der ersten Flotte noch mit!"
jump sportarea
label HQ2:
Akiko "Das kann ich sehr gut verstehen, der Flug war bestimmt sehr anstrengend."
jump livingarea
label sportarea:
scene Sport
show Akiko at right
show Taro at left
Akiki "Das hier ist die Sportanlage. Hier trainieren wir täglich 2 bis 3 Stunden für unsere Kondition und Beweglichkeit, sowie Zielgenauigkeit im Kampf."
Akiko "Leider haben wir kein Glück und können einer der höheren Klassen beim Training zu schauen, aber dafür wird es noch mehr als Genug Zeit geben."
Taro "Ein beeindruckendes Trainingsgelände habt Ihr hier, gefällt mir sehr gut. Alles da was man braucht, sehr schön."
"There are two types of lies: Lies that hurt, and lies that don't."
Who is online
Users browsing this forum: Majestic-12 [Bot]