Is it possible to show a sprite's image later on? [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
pyopyon
Veteran
Posts: 450
Joined: Thu Aug 29, 2013 4:35 am
Completed: https://chouette.itch.io/
Projects: Ocean Pearls, Catching the Fox [NaNo16], Singles
Organization: Jellyfish Parade
Tumblr: jelpiparade
Skype: miss.chouette
Soundcloud: pyopyon
itch: chouette
Contact:

Is it possible to show a sprite's image later on? [SOLVED]

#1 Post by pyopyon » Thu Jan 23, 2014 2:53 am

Sorry, I had to cut the question, but, okay. So I used the dress-up game code (can be found in the cookbook) and one of the things I customized in it was skin color.

For that reason, the sprite/main character that's talking... I don't want her to be visible until AFTER the dress up portion of the game (for continuity purposes, ofc) That said, I've also made it so that the player uses their own name when playing the game. So... is there anything I can do/coding I can add that doesn't reveal the side sprite until post dress-up game?
Last edited by pyopyon on Thu Mar 13, 2014 7:25 am, edited 1 time in total.
Image ImageImage

WiP: Image

✿ Writer for Trade/Commission ✿

User avatar
akemicchi
Veteran
Posts: 465
Joined: Mon Dec 31, 2007 11:22 pm
Projects: Magicians of Delphine, Panaderia: Ensaimada, SweetTooth!, XOXO Droplets
Deviantart: littlebabyshoes
Contact:

Re: Is it possible to show a sprite's image later on?

#2 Post by akemicchi » Thu Jan 23, 2014 6:20 am

I'd suggest just defining a new character with all the same parameters but without the side image.

User avatar
pyopyon
Veteran
Posts: 450
Joined: Thu Aug 29, 2013 4:35 am
Completed: https://chouette.itch.io/
Projects: Ocean Pearls, Catching the Fox [NaNo16], Singles
Organization: Jellyfish Parade
Tumblr: jelpiparade
Skype: miss.chouette
Soundcloud: pyopyon
itch: chouette
Contact:

Re: Is it possible to show a sprite's image later on?

#3 Post by pyopyon » Thu Jan 23, 2014 11:08 am

But the way the character is defined is by the [povname!t] function... So would the player basically just have to type in their info all over again?
Image ImageImage

WiP: Image

✿ Writer for Trade/Commission ✿

Tsapas
Regular
Posts: 69
Joined: Mon Oct 14, 2013 8:18 am
Contact:

Re: Is it possible to show a sprite's image later on?

#4 Post by Tsapas » Thu Jan 23, 2014 11:22 am

If by sprite you mean the side image, I believe it can be done with ConditionSwitch.
E.g.

Code: Select all

define pov = Character("[povname]", color=#FF0000, show_side_image=ConditionSwitch(
          "dress_up == False", "false.png",
          "dress_up == True", "true.png"))
You just need to declare a dress_up variable that is False until the dress-up game, and True after it is completed.
true.png is the actual side image, and none.png could be a fully transparent image with the same size to avoid text padding inconsistency between different side images.

User avatar
akemicchi
Veteran
Posts: 465
Joined: Mon Dec 31, 2007 11:22 pm
Projects: Magicians of Delphine, Panaderia: Ensaimada, SweetTooth!, XOXO Droplets
Deviantart: littlebabyshoes
Contact:

Re: Is it possible to show a sprite's image later on?

#5 Post by akemicchi » Thu Jan 23, 2014 8:19 pm

Ahaha, I'm sorry, I don't know what the !t is for, so sorry if this doesn't work...
But if it's just speaking, you could always keep using [povname!t] in the text. You don't need to define it again. Just change the speaker, with name [povname].

Code: Select all

define MC = Character("[povname]", show_side_image="image.png")
define noimageMC = Character("[povname]")

label start:
    MC "My name is [povname] but I have a side image."
    noimageMC "I, too, am [povname] but I have no side image."

User avatar
pyopyon
Veteran
Posts: 450
Joined: Thu Aug 29, 2013 4:35 am
Completed: https://chouette.itch.io/
Projects: Ocean Pearls, Catching the Fox [NaNo16], Singles
Organization: Jellyfish Parade
Tumblr: jelpiparade
Skype: miss.chouette
Soundcloud: pyopyon
itch: chouette
Contact:

Re: Is it possible to show a sprite's image later on?

#6 Post by pyopyon » Fri Jan 24, 2014 2:37 am

Tsapas wrote:If by sprite you mean the side image, I believe it can be done with ConditionSwitch.
E.g.

Code: Select all

define pov = Character("[povname]", color=#FF0000, show_side_image=ConditionSwitch(
          "dress_up == False", "false.png",
          "dress_up == True", "true.png"))
You just need to declare a dress_up variable that is False until the dress-up game, and True after it is completed.
true.png is the actual side image, and none.png could be a fully transparent image with the same size to avoid text padding inconsistency between different side images.
I wasn't sure how to implement this since it's not a .png file, but a dynamic displayable... Thank you though for trying to help!
akemicchi wrote:Ahaha, I'm sorry, I don't know what the !t is for, so sorry if this doesn't work...
But if it's just speaking, you could always keep using [povname!t] in the text. You don't need to define it again. Just change the speaker, with name [povname].

Code: Select all

define MC = Character("[povname]", show_side_image="image.png")
define noimageMC = Character("[povname]")

label start:
    MC "My name is [povname] but I have a side image."
    noimageMC "I, too, am [povname] but I have no side image."
AHHH THIS WORKED PERFECTLY, thank you. Now for some reason, my character's image is directly BELOW the textbox... I'll figure it out though XD, thanks so much!
Image ImageImage

WiP: Image

✿ Writer for Trade/Commission ✿

Post Reply

Who is online

Users browsing this forum: Google [Bot]