Screen action to show displayable?[SOLVED]

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
TellerFarsight
Veteran
Posts: 230
Joined: Sun Jun 04, 2017 8:09 pm
Projects: Vora, Secrets Untold
Location: Toronto, ON
Contact:

Screen action to show displayable?[SOLVED]

#1 Post by TellerFarsight »

The Show() Screen Action can only show another Screen, yeah? (Same with Hide() I suppose?) But is there a way to use it to manipulate displayables on the 'main' layer, like sprites?
Last edited by TellerFarsight on Wed Sep 13, 2017 2:57 pm, edited 3 times in total.
Current Project: Vora
Also Check Out: Devil Survivor [Reverse-Engineered]

User avatar
Divona
Miko-Class Veteran
Posts: 678
Joined: Sun Jun 05, 2016 8:29 pm
Completed: The Falconers: Moonlight
Organization: Bionic Penguin
itch: bionicpenguin
Contact:

Re: Screen action to show displayable?

#2 Post by Divona »

Use Function() and renpy.show() in action, perhaps?
Completed:
Image

User avatar
TellerFarsight
Veteran
Posts: 230
Joined: Sun Jun 04, 2017 8:09 pm
Projects: Vora, Secrets Untold
Location: Toronto, ON
Contact:

Re: Screen action to show displayable?

#3 Post by TellerFarsight »

Perfect!
Current Project: Vora
Also Check Out: Devil Survivor [Reverse-Engineered]

User avatar
TellerFarsight
Veteran
Posts: 230
Joined: Sun Jun 04, 2017 8:09 pm
Projects: Vora, Secrets Untold
Location: Toronto, ON
Contact:

Re: Screen action to show displayable?

#4 Post by TellerFarsight »

So I tried to use that to show an image at a certain transform:

Code: Select all

Function(renpy.show, "my_image", at_list=my_transform)
and it returns the error "'ATLTransform' object is not iterable"
The screen that has the button is also a called screen, by the way, if that's maybe the problem.
Current Project: Vora
Also Check Out: Devil Survivor [Reverse-Engineered]

User avatar
Divona
Miko-Class Veteran
Posts: 678
Joined: Sun Jun 05, 2016 8:29 pm
Completed: The Falconers: Moonlight
Organization: Bionic Penguin
itch: bionicpenguin
Contact:

Re: Screen action to show displayable?

#5 Post by Divona »

"at_list" taking a list of transforms. So the code should be:

Code: Select all

Function(renpy.show, "my_image", at_list=[my_transform])
Completed:
Image

User avatar
TellerFarsight
Veteran
Posts: 230
Joined: Sun Jun 04, 2017 8:09 pm
Projects: Vora, Secrets Untold
Location: Toronto, ON
Contact:

Re: Screen action to show displayable?

#6 Post by TellerFarsight »

Got it. Not iterable because it's expecting a list. It works now, thank you!
Current Project: Vora
Also Check Out: Devil Survivor [Reverse-Engineered]

User avatar
TellerFarsight
Veteran
Posts: 230
Joined: Sun Jun 04, 2017 8:09 pm
Projects: Vora, Secrets Untold
Location: Toronto, ON
Contact:

Re: Screen action to show displayable?

#7 Post by TellerFarsight »

Alright, another question:

Code: Select all

screen select_target(char):
    button:
            action Function(renpy.show, "char_square", at_list=[char_pos])
If I do this, it tells me "char_pos" is not defined. I have defined "Eileen_pos" and I've called the screen seelct_target(Eileen). Is there a way to pass the argument down to the transform name? Oh, and also "Eileen_square" is not being called as I thought.
Current Project: Vora
Also Check Out: Devil Survivor [Reverse-Engineered]

User avatar
Divona
Miko-Class Veteran
Posts: 678
Joined: Sun Jun 05, 2016 8:29 pm
Completed: The Falconers: Moonlight
Organization: Bionic Penguin
itch: bionicpenguin
Contact:

Re: Screen action to show displayable?

#8 Post by Divona »

About the Eileen_square, you just have to combine a variable with string. I have no idea about the transform, though. This would be the way I do it, just have to add the transform in manually.

Code: Select all

screen select_target(char, atl=[]):
    button:
        action Function(renpy.show, char + "_square", at_list=atl)
Completed:
Image

User avatar
TellerFarsight
Veteran
Posts: 230
Joined: Sun Jun 04, 2017 8:09 pm
Projects: Vora, Secrets Untold
Location: Toronto, ON
Contact:

Re: Screen action to show displayable?

#9 Post by TellerFarsight »

Okay, I forgot about adding more arguments to the screen. That solved a lot of my problems, actually. Thanks!
Current Project: Vora
Also Check Out: Devil Survivor [Reverse-Engineered]

Post Reply

Who is online

Users browsing this forum: No registered users