character "transition" problem - 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
Kindynos
Newbie
Posts: 23
Joined: Wed Feb 06, 2013 10:42 pm
Projects: Artist's Heart
Location: Santiago, Chile
Contact:

character "transition" problem - solved

#1 Post by Kindynos » Sat Sep 21, 2013 4:15 pm

The title can be a bit confusing- but. . . Well, Whenever I make a character change expressions, I do it with the dissolve transition, mainly because it looks more smooth, of course. However, whenever the character changes expressions, the dialogues disappear.

What I want to do is to have the character change expressions as they talk, I've tried many things but can't seem to find the proper way to do so, any help. . ?
Last edited by Kindynos on Sat Sep 21, 2013 6:16 pm, edited 1 time in total.
I'm probably the most nervous game maker you'll find, it's a fact

Elmiwisa
Veteran
Posts: 476
Joined: Sun Jul 21, 2013 8:08 am
Contact:

Re: character "transition" problem

#2 Post by Elmiwisa » Sat Sep 21, 2013 4:27 pm

Oh I got this problem before too. I fixed it with this code (put in options.rpy):

Code: Select all

init python:
    def bad_window_bad():
        try:
            extend("",interact=False)
        except:
            pass
    config.empty_window=bad_window_bad
Then before the dialogue start, put:

Code: Select all

window show
to keep the window open through transition.
If you need to hide the window for some reason (like say trying to call a screen) then use

Code: Select all

window hide
to make it disappear.

User avatar
Kindynos
Newbie
Posts: 23
Joined: Wed Feb 06, 2013 10:42 pm
Projects: Artist's Heart
Location: Santiago, Chile
Contact:

Re: character "transition" problem

#3 Post by Kindynos » Sat Sep 21, 2013 4:33 pm

Mm, it works, but kinda in a reverse manner. Like, the character does the expression change at the end of a line, when I want him to do it when he starts a sentence, I'm not sure if I made myself clear ;;
I'm probably the most nervous game maker you'll find, it's a fact

Elmiwisa
Veteran
Posts: 476
Joined: Sun Jul 21, 2013 8:08 am
Contact:

Re: character "transition" problem

#4 Post by Elmiwisa » Sat Sep 21, 2013 4:51 pm

Kindynos wrote:Mm, it works, but kinda in a reverse manner. Like, the character does the expression change at the end of a line, when I want him to do it when he starts a sentence, I'm not sure if I made myself clear ;;
Maybe I don't understand what you means by that. My character always do it at the start of the sentence. Perhaps you would want to describe it in more details to see what went wrong? Here is an example from mine:

Code: Select all

image bigbro calm="brother_calm.png"
image bigbro panic="brother_panic.png"
image bigbro huh="brother_notunderstand.png"

image side bigbro calm=im.Crop("brother_calm.png",100,0,200,200)
image side bigbro panic=im.Crop("brother_panic.png",100,0,200,200)
image side bigbro huh=im.Crop("brother_notunderstand.png",100,0,200,200)

define bb=Character("Brother (name later)",image="bigbro")

Code: Select all

    show bigbro huh
    bb "What's wrong [povname]?"
    bb "You look as if you just see a ghost"

    bb calm "Just calm down, you are not making any senses."

    bb panic "What? What did you just say?"
So at the line bb calm "Just calm down, you are not making any senses." the line "Just calm down, you are not making any senses." will be shown right at bb's transition to the calm face. Then on the line bb panic "What? What did you just say?" the similar thing happen, the dialogue will be shown while bb is transitioning to panic mode.

User avatar
Kindynos
Newbie
Posts: 23
Joined: Wed Feb 06, 2013 10:42 pm
Projects: Artist's Heart
Location: Santiago, Chile
Contact:

Re: character "transition" problem

#5 Post by Kindynos » Sat Sep 21, 2013 5:03 pm

Well, I put the code you gave me in the options.rpy and what happens is that the character finishes the sentence, the sentence stays there, character changes expression, and then the next sentence comes. It's almost the same problem than before, just that the text doesn't disappear.
I'm probably the most nervous game maker you'll find, it's a fact

Elmiwisa
Veteran
Posts: 476
Joined: Sun Jul 21, 2013 8:08 am
Contact:

Re: character "transition" problem

#6 Post by Elmiwisa » Sat Sep 21, 2013 5:31 pm

Hm...can you try the example code I gave to see if it still don't work there as well? Just replace the images file with something you have. I checked the transition very carefully, even slowing down the dissolve to see exactly what happen at what time. The new dialogue definitely display at the start of the transition.
Also, it would help if you put up a snippet of your code for me to try. Perhaps there is something else in a different part of my code that make things work correctly, rather than due to this part of the code.

User avatar
Kindynos
Newbie
Posts: 23
Joined: Wed Feb 06, 2013 10:42 pm
Projects: Artist's Heart
Location: Santiago, Chile
Contact:

Re: character "transition" problem

#7 Post by Kindynos » Sat Sep 21, 2013 5:42 pm

Well, I doubt I could even try it with your code, as I do not use side images and have quite a different setting-

How I have it set is like this.

Code: Select all

image sebastian smirk = "Sebastian_smirk.png"
image sebastian pout = "Sebastian_pout.png"
image sebastian happy = "Sebastian_happy.png"
image sebastian neutral = "Sebastian_neutral.png"

define s = Character('Sebastian', show_two_window=True, color="#a8a8a8")
define j = Character('Javiera', show_two_window=True, color="#FFFFFF")
the dialogue itself goes like this

Code: Select all

show sebastian smirk
    with dissolve
    
    s "Hey there~"
    j "What do you want, Sebastian." 
    
    show sebastian pout 
    with dissolve
    
    s "Well, don't you always receive in such a warm way?"
    j ". . ."
I have the suspicion that it's the "with dissolve" part that screws up everything, but again, I need that transition
I'm probably the most nervous game maker you'll find, it's a fact

Elmiwisa
Veteran
Posts: 476
Joined: Sun Jul 21, 2013 8:08 am
Contact:

Re: character "transition" problem

#8 Post by Elmiwisa » Sat Sep 21, 2013 6:10 pm

You are absolutely correct, the problem is indeed with the with statement with it being before the say statement and all. All you need to do is to put it at the proper location. For example:

Code: Select all

    show sebastian pout
   
    s "Well, don't you always receive in such a warm way?" with dissolve
Technically, this is a with clause now, not a with statement anymore, which normally don't act like what we want. But a with clause in a say statement appeared to be one special circumstance when the with clause act like a with statement.

User avatar
Kindynos
Newbie
Posts: 23
Joined: Wed Feb 06, 2013 10:42 pm
Projects: Artist's Heart
Location: Santiago, Chile
Contact:

Re: character "transition" problem

#9 Post by Kindynos » Sat Sep 21, 2013 6:16 pm

!!! There it is!! I had tried doing that before and it didn't really work but oh my god thank you!!! I can finally make it look better !!
I'm probably the most nervous game maker you'll find, it's a fact

Post Reply

Who is online

Users browsing this forum: Bing [Bot], Google [Bot], tiya_nofurita