[solved] call screen variable?

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
Arisae
Regular
Posts: 32
Joined: Wed Dec 24, 2014 5:39 pm
Completed: Discouraged Workers/YGGDRASIL JIGSAW PUZZLE
Projects: Working on some projects
Organization: YGGDRASIL STUDIO
Github: YGGDRASIL-STUDIO
itch: yggdrasilstudio
Location: Korea, Republic of.
Contact:

[solved] call screen variable?

#1 Post by Arisae » Thu Mar 14, 2019 4:19 am

In the label, when use call screen, is there a way that use variable value to the screen name?
In the screen, we can use variable to screen name but I can't imagine how to use variable to the screen name with call screen in the label.

Thanks,

Lee Yunseok
Last edited by Arisae on Fri Mar 15, 2019 1:41 am, edited 1 time in total.
Independent Cultural Artist. Currently working for the Project DW.

Image Image Image Image

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: call screen variable?

#2 Post by Remix » Thu Mar 14, 2019 5:29 am

$ var = "my_screen"
call expression var

https://www.renpy.org/doc/html/label.ht ... -statement
Frameworks & Scriptlets:

User avatar
Arisae
Regular
Posts: 32
Joined: Wed Dec 24, 2014 5:39 pm
Completed: Discouraged Workers/YGGDRASIL JIGSAW PUZZLE
Projects: Working on some projects
Organization: YGGDRASIL STUDIO
Github: YGGDRASIL-STUDIO
itch: yggdrasilstudio
Location: Korea, Republic of.
Contact:

Re: call screen variable?

#3 Post by Arisae » Thu Mar 14, 2019 6:16 pm

Remix wrote:
Thu Mar 14, 2019 5:29 am
$ var = "my_screen"
call expression var

https://www.renpy.org/doc/html/label.ht ... -statement
But it calls the label. I want to screen.
Independent Cultural Artist. Currently working for the Project DW.

Image Image Image Image

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: call screen variable?

#4 Post by Remix » Thu Mar 14, 2019 8:01 pm

Oops, I didn't spot you were talking about screens:

$ renpy.call_screen( var )
Frameworks & Scriptlets:

User avatar
Arisae
Regular
Posts: 32
Joined: Wed Dec 24, 2014 5:39 pm
Completed: Discouraged Workers/YGGDRASIL JIGSAW PUZZLE
Projects: Working on some projects
Organization: YGGDRASIL STUDIO
Github: YGGDRASIL-STUDIO
itch: yggdrasilstudio
Location: Korea, Republic of.
Contact:

Re: call screen variable?

#5 Post by Arisae » Fri Mar 15, 2019 1:47 am

Remix wrote:
Thu Mar 14, 2019 8:01 pm
Oops, I didn't spot you were talking about screens:

$ renpy.call_screen( var )
It works well. Thank you Remix!
Independent Cultural Artist. Currently working for the Project DW.

Image Image Image Image

Post Reply

Who is online

Users browsing this forum: enaielei