Page 1 of 1

Show and Hide Problems

Posted: Wed Aug 20, 2008 4:51 pm
by VaanAshe
I've got a slight problem again. It's probably something really simple, but yeah, whatever.

Firstly, my character can't return back to images used previously in the scene for some reason, and I'm not sure why.

In the code below, "danii" has three facial expressions in a school uniform - "01", "02" and "03", all of which are tagged "danii_01", "danii_02" and "danii_03". However, in the below, she doesn't actually change to "03" the second time round:

Code: Select all

show danii_03
    with dissolve
    
    "Girl" "Hey mister? Are you dead?"
    w "Wha'? Do I look dead?!"
    
    show danii_02
    
    "Girl" "Yay! You're alive!"
    w "...who is she...?"
    "Girl" "Huh? Oh yeah! My name is Danii!"
    
    hide snowblossom with dissolve
    
    da1 "What's your name mister?"
    w "Huh?! You don't even know me! Why are you telling me your name?! Didn't you mother ever tell you not to talk to strangers?!"
    
    show danii_03
This actually applies later on as well, when she changes to "01", but then can't change back to "03".

On top of that, at the end, I've put this in:

Code: Select all

    "She ran off down the street, not even answering my question."
    
    hide danii with dissolve
    
    "I wasn't really sure what to make of her, but that was just the beginning of my crazy summer."
However, she doesn't actually go, and instead remains until after that sentence when the scene changes. The same happens later with another character called "Jax", but this is worse because Danii actually ends up on top of her (and, as such, they're labelled the same way).

However, it works on a third character called "Callie" who's labelled exactly the same way, so I'm not really sure.

So...err, what am I doing wrong?

Re: Show and Hide Problems

Posted: Wed Aug 20, 2008 4:58 pm
by N0UGHTS
Indentation, indentation...

Code: Select all

   show danii_03 with dissolve
    
   "Girl" "Hey mister? Are you dead?"
   w "Wha'? Do I look dead?!"
    
   show danii_02
    
   "Girl" "Yay! You're alive!"
   w "...who is she...?"
   "Girl" "Huh? Oh yeah! My name is Danii!"
    
   hide snowblossom with dissolve
    
   da1 "What's your name mister?"
   w "Huh?! You don't even know me! Why are you telling me your name?! Didn't you mother ever tell you not to talk to strangers?!"
    
   show danii_03
...That's a pretty interesting conversation you have there. XD So your game involves a dead and hysterical protagonist... Interesting...

Those statements can't be grouped together, just remember that.

Re: Show and Hide Problems

Posted: Wed Aug 20, 2008 5:08 pm
by VaanAshe
Actually, it is indented (I don't know why I didn't highlight the whole line ;_;):

Code: Select all

    show danii_03 with dissolve
    
    "Girl" "Hey mister? Are you dead?"
    w "Wha'? Do I look dead?!"
    
    show danii_02
    
    "Girl" "Yay! You're alive!"
    w "...who is she...?"
    "Girl" "Huh? Oh yeah! My name is Danii!"
    
    hide snowblossom with dissolve
    
    da1 "What's your name mister?"
    w "Huh?! You don't even know me! Why are you telling me your name?! Didn't you mother ever tell you not to talk to strangers?!"
    
    show danii_03
It actually still doesn't work, not even like that. ;_;

Re: Show and Hide Problems

Posted: Wed Aug 20, 2008 5:10 pm
by N0UGHTS
Any traceback or error texts? Or it just runs without changing?

Re: Show and Hide Problems

Posted: Wed Aug 20, 2008 5:12 pm
by VaanAshe
N0UGHTS wrote:Any traceback or error texts? Or it just runs without changing?
It just runs without changing.

I've actually tried shoving a "hide danii_02" before the second "show danii_03", and it changes it then, but I'm not sure why it's not grouping the two together under "danii", while it does group "callie_01/2/3" together.

Of course, it means I can get it to run with the changes and stuff, but I'd prefer to keep my sanity and keep them grouped. ;_;

Re: Show and Hide Problems

Posted: Wed Aug 20, 2008 5:25 pm
by PyTom
The problem is that the separator between image parts is space ' ', not underscore '_'. So Ren'Py is considering danii_01, danii_02, and dani_03 to be three separate images. If you break them up, then things will work as you expect.

Note that you probably shouldn't include bare numbers in an image name. I'm not sure if it will work or not, but it shouldn't. Instead, you could define 'danii e01', or better yet 'danii happy'.

Re: Show and Hide Problems

Posted: Wed Aug 20, 2008 5:41 pm
by N0UGHTS
Yeah, bare Arabic numerals don't work at all as image variables. Filenames purely made out of them don't, either..

If you want to define images by numbers you could go Roman. danii i, danii ii, stuff like that.

Re: Show and Hide Problems

Posted: Wed Aug 20, 2008 5:43 pm
by VaanAshe
Yeah, I shoved an "e" before the numbers (putting a space instead of underscore too), and it's working now. ^_^ Thanks!