Side image doesn't appear on the screen anymore [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
Meg'
Regular
Posts: 185
Joined: Tue Sep 27, 2011 10:37 am
Projects: Anges Démoniaques, Gang (Alex & Hugo), Le passé dans les veines
Location: France
Contact:

Side image doesn't appear on the screen anymore [SOLVED]

#1 Post by Meg' » Sun Jul 06, 2014 12:03 pm

How can I get the side image to appear on the screen again?

Everything is in the title. The code I have always worked until now, I didn't change it and I always saw the side image. I don't know why, it suddenly won't appear on the screen anymore. I tried to change the xalign and yalign, still nothing.

Here is my code:

Code: Select all

define e = Character(('[player_name]'))
$ show_side_image = ConditionSwitch((
'mood==0', 'c_colere_crie',
'mood==1', 'c_colere_sourire',
'mood==2', 'c_neutre', 
'mood==3', 'c_pleure_parle',
'mood==4', 'c_pleure_silencieuse',
'mood==5', 'c_souris',
'mood==6', 'c_surprise',
'mood==7', 'c_triste_parle',
'mood==8', 'c_triste_silencieuse',
'mood==9', 'c_triste_souris',
'mood==10', 'c_pleure_colere'),
xalign=0.0, yalign=1.0, window_left_padding=230) #adjust the left padding for your character size
And here is how I call a side image in the script:

Code: Select all

label start:

    scene Prologue
    with Dissolve(0.3)
    $ renpy.pause(2.0, hard=True)




#PROLOGUE

    scene fond noir 

    "Et si vous deviez vendre votre âme au diable pour sauver un être cher, le feriez-vous ?"

    "Peu importe le nombre de contrats signés, la quantité de sang versée et l’importance des vies brisées, il est des choses qui sont inévitables.
    Le mal et le bien."

    "Ces deux opposés se mélangent, s’assemblent et se ressemblent, devenant alors méconnaissables. 
    Il ne reste plus qu’à espérer que cette fois, la fin soit différente." 

    $ player_name = renpy.input(_("Avant de commencer, quel est ton nom petite innocente ?"),"Chiyo", length=15) or "Chiyo"

    "Domicile familial"

    hide fond noir

    scene salon

    "Mes parents se trouvaient dans le salon et discutaient de la visite prochaine de mes grands-parents à l'occasion de l'anniversaire de maman.
    Je m’apprêtais à sortir lorsque l’un d’eux m’interpela."

    Pere "Peux-tu remonter un pack d’eau de la cave, ma chérie ?"

    "Je poussai un soupir d’agacement. N’aurait-il pas pu le faire lui-même ?"
 
    "Il savait pertinemment que le jeune homme de l’horlogerie ne m’attendrait pas pour fermer sa boutique et le cadeau de ma mère non plus. 
    Je lançai un regard exaspéré en direction du salon puis me dirigeai vers la porte de la cave."

    hide salon

    scene sous_sol with dissolve

    "Notre maison était grande bien qu’un peu ancienne ; sa décoration soigneusement décidée par maman rendait l'endroit chaleureux et très accueillant 
    contrairement au sous-sol qui me mettait profondément mal à l'aise." 

    "Sombre et humide quelques fois durant l'hiver, les termites rongeaient avec joie le bois des murs malgré les travaux de rénovation entrepris par 
    mon père."

    "La cave servait un peu de fourre-tout : La caisse à outil du père, mes vieux jouets d’enfant, un vélo inutilisé, des cahiers d’école, 
    des cartons de vêtements… La présence de tous ces objets familiers aurait dû me rassurer,"
 
    "mais à chaque fois que je pénétrai dans ce lieu isolé de la maison, un sentiment de malaise mêlé à une nostalgie profonde me saisissait."

    "L’endroit habituellement froid, ne me donnait pas que de simples frissons, j’en avais aussi une peur terrible. 
    Une sensation déchirante m’agrippa la gorge, me suffoqua et fit venir les larmes à mes yeux."
 
    "Mes jambes me portèrent à peine tandis mes mains tremblaient violemment, tentant désespérément à allumer la lumière."

    "Boumboum boumboum"

    hide sous-sol

    scene sous_sol
    with hpunch

    "Le coeur battant le chamade et le souffle coupé, j'actionnai finalement l’interrupteur qui fit disparaître l’obscurité."

    hide sous-sol

    scene sous_sol2

    "Je m’adossai contre le mur, drainée de toute énergie et peinant à reprendre mon souffle." 

    $ mood = 7

    e "Reprends-toi ma petite. Il n’y a que les enfants pour avoir peur du noir et de la cave…"

    "La porte condamnée par papa à notre arrivée ici attira mon attention ; elle ne dégageait rien de particulier et pourtant mes yeux ne parvenaient à
    s'en détâcher."
I tried to launch the game without any backgrounds to see if the side image was hidden under some layers. I really tried everything I could think of.

I use ren'py 6-17.6

Thank you in advance for your help.
Last edited by Meg' on Tue Jul 08, 2014 9:15 am, edited 1 time in total.

User avatar
ArachneJericho
Regular
Posts: 196
Joined: Sun Jun 22, 2014 2:04 am
Projects: Kaguya Hime
Tumblr: mousedeerproductions
Location: Seattle, WA, USA
Contact:

Re: Side image doesn't appear on the screen anymore

#2 Post by ArachneJericho » Sun Jul 06, 2014 2:36 pm

Make sure your mood variable isn't being overwritten to be outside of that range? (Going for simple possible solutions first).

Because it sounds like other code changed in your project and that's affecting this code, even though you didn't change this code.

User avatar
Meg'
Regular
Posts: 185
Joined: Tue Sep 27, 2011 10:37 am
Projects: Anges Démoniaques, Gang (Alex & Hugo), Le passé dans les veines
Location: France
Contact:

Re: Side image doesn't appear on the screen anymore

#3 Post by Meg' » Mon Jul 07, 2014 10:43 am

ArachneJericho wrote:Make sure your mood variable isn't being overwritten to be outside of that range? (Going for simple possible solutions first).

Because it sounds like other code changed in your project and that's affecting this code, even though you didn't change this code.
I don't see what it could be :(
I took a look at variable viewer when one of the moods should appear and it says that there are only two variables: the mood I expect to appear and the one about the player choosing his name.

I tried to think of something else because I'm stuck with that code. Isn't there a code (excepting the side image) that allows an image to be above the textbox??

User avatar
Chaotic
Regular
Posts: 30
Joined: Fri Feb 22, 2013 7:32 pm
Location: England, UK
Contact:

Re: Side image doesn't appear on the screen anymore

#4 Post by Chaotic » Mon Jul 07, 2014 12:32 pm

Either I'm being blind or whatever but shouldn't the expressions have a .jpg or .png or .jpeg depending on your extension end?

EDIT: If a conditionswitch doesn't work you could always try this:
http://lemmasoft.renai.us/forums/viewto ... =8&t=27182

User avatar
Meg'
Regular
Posts: 185
Joined: Tue Sep 27, 2011 10:37 am
Projects: Anges Démoniaques, Gang (Alex & Hugo), Le passé dans les veines
Location: France
Contact:

Re: Side image doesn't appear on the screen anymore

#5 Post by Meg' » Mon Jul 07, 2014 1:54 pm

I tried it like this:

Code: Select all

define e = Character(('[player_name]'))
$ e = Character("[player_name]", 
image = "e", window_left_padding =230)
image side 0 = ("c_colere_crie.png")
image side 1 = ("c_colere_sourire.png")
image side 2 = ("c_neutre.png")
image side 3 = ("c_pleure_parle.png")
image side 4 = ("c_pleure_silencieuse.png")
image side 5 = ("c_souris.png")
image side 6 = ("c_surprise.png")
image side 7 = ("c_triste_parle.png")
image side 8 = ("c_triste_silencieuse.png")
image side 9 = ("c_triste_souris.png")
image side 10 = ("c_pleure_colere.png")
And called it like that:

Code: Select all

    "Je m’adossai contre le mur, drainée de toute énergie et peinant à reprendre mon souffle." 

    show e 7

    e "Reprends-toi ma petite. Il n’y a que les enfants pour avoir peur du noir et de la cave…"
It works, the image appears again. The thing is, I can't position it like I want. I tried to change the xalign and yalign in the "say" section. It didn't work. I also tried adding it in the script like that ==>

Code: Select all

define e = Character(('[player_name]'))
$ e = Character("[player_name]", 
image = "e", xalign=0.0, yalign=1.0, window_left_padding =230)
image side 0 = ("c_colere_crie.png")
image side 1 = ("c_colere_sourire.png")
image side 2 = ("c_neutre.png")
image side 3 = ("c_pleure_parle.png")
image side 4 = ("c_pleure_silencieuse.png")
image side 5 = ("c_souris.png")
image side 6 = ("c_surprise.png")
image side 7 = ("c_triste_parle.png")
image side 8 = ("c_triste_silencieuse.png")
image side 9 = ("c_triste_souris.png")
image side 10 = ("c_pleure_colere.png")
The image still won't move.

User avatar
Alex
Lemma-Class Veteran
Posts: 2981
Joined: Fri Dec 11, 2009 5:25 pm
Contact:

Re: Side image doesn't appear on the screen anymore

#6 Post by Alex » Mon Jul 07, 2014 2:50 pm

Code: Select all

define e = Character(('[player_name]'))
and

Code: Select all

$ e = Character(...)
do pretty much the same (first is the modern style and last is the old style)

Code: Select all

$ e = Character("[player_name]", image = "e", window_left_padding =230)
defines character "e" and associate side images that have tag "e" with it.
But you didn't declared any side images that have "e" tag in their names.

Try

Code: Select all

define e = Character('[player_name]',  image = "a", window_left_padding =230)
image side a c = ("c_colere_crie.png")
image side a n = ("c_neutre.png")

label start:
    $ player_name = "???"
    e c "..."
    e n "?"
http://lemmasoft.renai.us/forums/viewto ... 22#p249092
http://www.renpy.org/doc/html/dialogue. ... er-objects

User avatar
Meg'
Regular
Posts: 185
Joined: Tue Sep 27, 2011 10:37 am
Projects: Anges Démoniaques, Gang (Alex & Hugo), Le passé dans les veines
Location: France
Contact:

Re: Side image doesn't appear on the screen anymore

#7 Post by Meg' » Tue Jul 08, 2014 9:14 am

I did it like you suggested Alex, and it worked! Thank you! :D

Post Reply

Who is online

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