Sprites won't change

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
M.T.D.G.
Regular
Posts: 112
Joined: Sun Jun 01, 2008 12:37 pm
Completed: -SacrifiXi (BxB)-Beta-Love (BxB)-Ivan Berk Dress Up Game-Kiss the Cock (BxG)
Projects: -Death on Holiday (BxG)
Tumblr: mtdg
Deviantart: M-T-D-G
itch: mtdg
Location: Italy
Contact:

Sprites won't change

#1 Post by M.T.D.G. » Sat Jun 23, 2012 12:32 pm

Hello! I'm currently working on my second visual novel but I'm having a problem which I don't understand.

First part of the script didn't give me problem but then, after I introduced a new character, sprites started not to change! They change sometimes, with certain poses but they aren't always the same and this affects also the other characters already introduced.

The first time, lint told me I didn't declared two sprites of this character but it wasn't true 'cause I double checked it. So I tried re-typing the same name and the error didn't show up anymore but the problem still was there. So I tried changing the name and the file from .png to .gif but still nothing.
I tried to hide the sprite which didn't change but it didn't hide! There was the transition, but there was still the same sprite.
I'm going crazy 'cause I don't understand what's the problem. Everything looks regoular but doesn't work.

And, another little question:
In my first visual novel, I had to write "show A at right" just one time, and then all the sprite related to A were to the right. But, with this second visual novel, why do I have to write for each sprite the side where it should appear or else it will stand into the centre? Is it because I changed the screen size?

Ok, end of my noobness.
Thanks in advance!!! :D
mtdg.tumblr.com (nsfw)

ImageImageImageImageImage

User avatar
Showsni
Miko-Class Veteran
Posts: 563
Joined: Tue Jul 24, 2007 12:58 pm
Contact:

Re: Sprites won't change

#2 Post by Showsni » Sat Jun 23, 2012 12:40 pm

Could you post an example of your code where you're having problems?

User avatar
M.T.D.G.
Regular
Posts: 112
Joined: Sun Jun 01, 2008 12:37 pm
Completed: -SacrifiXi (BxB)-Beta-Love (BxB)-Ivan Berk Dress Up Game-Kiss the Cock (BxG)
Projects: -Death on Holiday (BxG)
Tumblr: mtdg
Deviantart: M-T-D-G
itch: mtdg
Location: Italy
Contact:

Re: Sprites won't change

#3 Post by M.T.D.G. » Sat Jun 23, 2012 1:14 pm

Showsni wrote:Could you post an example of your code where you're having problems?
Ok, but it's really a simple and basic script:

Code: Select all

# Declare images below this line, using the image statement.
(the bali character generally doesn't give problem, but it does when the character Master appears)
image bali_normale = "bali_normale.png"
image bali_pensieroso = "bali_pensieroso.png"
image bali_perplesso = "bali_perplesso.png"
image bali_rabbia_a = "bali_rabbia_a.png"
image bali_rabbia_b = "bali_rabbia_b.png"
image bali_trapel = "bali_trapel.png"

("must" is always master. Changing the name of the suspected wrong sprite was one of the way I tried to solve the problem)
image must_normale_a = "master_stand_a.gif"
image must_normale_b = "master_stand_b.gif"
image master_saccente_a = "master_saccente_a.png"
image master_saccente_b = "master_saccente_b.png"
image master_sorriso = "master_sorriso.png"
image master_star = "master_star.png"
image master_difficile = "master_difficile.png"
image master_muso = "master_muso.png"

label start:
(I'll put an arrow where the sprite should change but it doesn't)
(b=bali and m=master)
    b "blah blah"
    narrator "blah blah"
    hide must_muso <<---
    show must_normale_a at left
    with dissolve
    m "blah blah"
    show bali_normale at right
    with dissolve
    b "blah blah"
    show master_saccente_a at left
    with dissolve
    m "blah blah."
    show bali_rabbia_b at right
    with dissolve
    b "blah blah"
    show master_saccente_b at left
    with dissolve
    m "blah blah"
    show bali_perplesso at right
    with dissolve
    b "blah blah"
    m "..."
    b "..."
    show must_normale_a at left <<---
    with dissolve
    m "blah blah"
    show bali_normale at right <<---
    with dissolve
    b "blah blah"
    m "blah blah"
    narrator "blah blah."
    show bali_rabbia_a at right
    with dissolve
    b "blah blah"
    show master_saccente_b at left 
    with dissolve
    m "blah blah"
    show bali_rabbia_b at right <<---
    with dissolve
    b "blah blah"
    show must_normale_b at left <<---
    with dissolve
    m "blah blah"
    b "..."
    show bali_normale at right <<---
    with dissolve
    narrator "blah blah"
    narrator "blah blah."
    show must_normale_a at left <<---
    with dissolve
    m "blah blah"
    b "blah blah"
    show master_star at left
    with dissolve
    m "blah blah"
    show bali_perplesso at right <<---
    with dissolve
    b "blah blah"
    show must_normale_a at left <<---
    with dissolve
    m "blah blah"
    show bali_normale at right <<---
    with dissolve
    b "blah blah"
    m "blah blah"
    menu:
        "blah blah ":
            $ ero_points += 1
            jump A
        "blah blah ":
            $ alone_points += 1
            jump B
        
label A:
    show bali_rabbia_a at right
    with dissolve
    b "blah blah"
    show master_muso at left <<---
    with dissolve
    m "blah blah"
    show bali_pensieroso at right
    with dissolve
    b "blah blah"
    show must_normale_a at left <<---
    with dissolve
    m "blah blah"
    show bali_rabbia_a at right <<---
    with dissolve

and it just goes on! :(
mtdg.tumblr.com (nsfw)

ImageImageImageImageImage

User avatar
Showsni
Miko-Class Veteran
Posts: 563
Joined: Tue Jul 24, 2007 12:58 pm
Contact:

Re: Sprites won't change

#4 Post by Showsni » Sat Jun 23, 2012 1:20 pm

I think the problem is because you're defining your image with underscores instead of spaces. With an underscore, something like
image bali_rabbia_a = "bali_rabbia_a.png"
and
image bali_rabbia_b = "bali_rabbia_b.png"

are completely different images, so if you show one and then show the other you'll just end up with one on top of the other one and both on the screen at once. If you use spaces:

image bali_rabbia a = "bali_rabbia_a.png"
image bali_rabbia b = "bali_rabbia_b.png"

Ren'Py will see that they share the same tag of "bali_rabbia" so if you show one and then show the other one it will instead replace it.

User avatar
M.T.D.G.
Regular
Posts: 112
Joined: Sun Jun 01, 2008 12:37 pm
Completed: -SacrifiXi (BxB)-Beta-Love (BxB)-Ivan Berk Dress Up Game-Kiss the Cock (BxG)
Projects: -Death on Holiday (BxG)
Tumblr: mtdg
Deviantart: M-T-D-G
itch: mtdg
Location: Italy
Contact:

Re: Sprites won't change

#5 Post by M.T.D.G. » Sat Jun 23, 2012 2:37 pm

Showsni wrote:I think the problem is because you're defining your image with underscores instead of spaces. With an underscore, something like
image bali_rabbia_a = "bali_rabbia_a.png"
and
image bali_rabbia_b = "bali_rabbia_b.png"

are completely different images, so if you show one and then show the other you'll just end up with one on top of the other one and both on the screen at once. If you use spaces:

image bali_rabbia a = "bali_rabbia_a.png"
image bali_rabbia b = "bali_rabbia_b.png"

Ren'Py will see that they share the same tag of "bali_rabbia" so if you show one and then show the other one it will instead replace it.
Very interesting :) Indeed I used to use the spaces in my first visual novel and never had problems.
I'm gonna do a bit of changes now and I'll let you know :wink: THANKS A LOT! I learned something new!
mtdg.tumblr.com (nsfw)

ImageImageImageImageImage

Post Reply

Who is online

Users browsing this forum: Bing [Bot]