I have two question about flag and text box

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
yuuri88
Newbie
Posts: 20
Joined: Fri Aug 02, 2019 11:58 am
Contact:

I have two question about flag and text box

#1 Post by yuuri88 »

1. I want to set two choice and both are bad end. The real end will be found after two choice have been chosen. But this is the question,when the game goes bad end. I need to return to title and autosave. but the flag can't be saved after it returns to title. How can I solve it?



2.I want to let different charactors own their text box How can I change text box?

User avatar
parttimestorier
Veteran
Posts: 429
Joined: Thu Feb 09, 2017 10:29 pm
Completed: No Other Medicine, Well Met By Moonlight, RE:BURN, The Light at the End of the Ocean, Take A Hike!, Wizard School Woes
Projects: Seeds of Dreams
itch: janetitor
Location: Canada
Contact:

Re: I have two question about flag and text box

#2 Post by parttimestorier »

For the first question, what you want is a persistent variable. The game will store that data even when you quit or load a different save.

For the second one, this tutorial looks pretty good and has a section on character-specific textboxes: viewtopic.php?f=51&t=9233
ImageImageImage

yuuri88
Newbie
Posts: 20
Joined: Fri Aug 02, 2019 11:58 am
Contact:

Re: I have two question about flag and text box

#3 Post by yuuri88 »

thank you so much I have been stuck these problems few weeks and don't know how to figure out!

yuuri88
Newbie
Posts: 20
Joined: Fri Aug 02, 2019 11:58 am
Contact:

Re: I have two question about flag and text box

#4 Post by yuuri88 »

And here is the other question. When I try to use persistent save I don't know how to write.

I just wrote this and doesn''t work.



default a = False
default b = False

label start:

$ autosave

if coin1 and coin2:
jump next
else:
menu:
"a":
jump a
"b":
jump b


label a:
$ a = True
$ a.save()
"get coin1"
return

label b:
$ b = True
$ b.save()
"get coin2"
return

label next:
"you win"

Post Reply

Who is online

Users browsing this forum: Bing [Bot]