[solved] is it possible to set save_name inside screens.rpy?

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
Kia
Eileen-Class Veteran
Posts: 1040
Joined: Fri Aug 01, 2014 7:49 am
Deviantart: KiaAzad
Discord: Kia#6810
Contact:

[solved] is it possible to set save_name inside screens.rpy?

#1 Post by Kia »

I've tried to do this the easy way without the whole making another label and make jumps:

Code: Select all

screen save():

    # This ensures that any other menu screen is replaced.
    tag menu

    use navigation
    $ save_name = s_name+":"+char_name
    text "[save_name]" yalign 0.8
    use file_picker
the text shows that save_name is changed but no save name is added to the save slot, I can guess 3 reasons for It but I how I can find out which one is the case?
guess 1: the save_name I have here is only a local variable inside the save screen (I've tried to make it a global variable but the result was the same)
guess 2: renpy takes save_name and stores it in another variable before save() is called
guess 3: I forgot what it was...
so anyway is there any way to do this without changing the key configuration and a whole bunch of unnecessary code?
Last edited by Kia on Tue Dec 01, 2015 2:04 am, edited 2 times in total.

User avatar
orz
Regular
Posts: 126
Joined: Tue Apr 21, 2015 10:19 pm
Contact:

Re: is it possible to set save_name inside screens.rpy?

#2 Post by orz »

It works if you use store.save_name instead of just save_name.

User avatar
Kia
Eileen-Class Veteran
Posts: 1040
Joined: Fri Aug 01, 2014 7:49 am
Deviantart: KiaAzad
Discord: Kia#6810
Contact:

Re: is it possible to set save_name inside screens.rpy?

#3 Post by Kia »

ow I didn't noticed your answer back then... but it's never late for saying thank you ^_^

Post Reply

Who is online

Users browsing this forum: babayi0827, Google [Bot]