[SOLVED]Showing Side Images Without Main Character Talking

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
Braydxne
Regular
Posts: 50
Joined: Tue Aug 08, 2017 4:03 am
Projects: DR: Chains of Trust
Contact:

[SOLVED]Showing Side Images Without Main Character Talking

#1 Post by Braydxne »

Sorry for the amount of questions I've been asking, but everyone here is very friendly and helpful! Anyways, what I wanna do is have the Side Image of my Main Character showing during times he isn't speaking. I tried using "show cohan smile", but instead of the side image showing up his regular full-body image shows up. Below is the code I've used to set him up.

Code: Select all

define co = Character("Cohan",
color = "#00ff42",
ctc="ctc_anchored",
ctc_position="fixed",
image="cohan",
window_left_padding=10,
window_background="GUI/CohanBox.png",
what_xpos=260,
who_ypos=11,
what_outlines=[ (2, "#000000") ],
who_outlines=[ (4, "#000000") ])

##Cohan
image side cohan angry point = "images/Cohan/Sides/side cohan angry point.png"
image side cohan angry = "images/Cohan/Sides/side cohan angry.png"
image side cohan blush frown = "images/Cohan/Sides/side cohan blush frown.png"
image side cohan blush smile = "images/Cohan/Sides/side cohan blush smile.png"
image side cohan crying = "images/Cohan/Sides/side cohan crying.png"
image side cohan friendly = "images/Cohan/Sides/side cohan friendly.png"
image side cohan happy = "images/Cohan/Sides/side cohan happy.png"
image side cohan mad = "images/Cohan/Sides/side cohan mad.png"
image side cohan scared = "images/Cohan/Sides/side cohan scared.png"
image side cohan shocked = "images/Cohan/Sides/side cohan shocked.png"
image side cohan smile = "images/Cohan/Sides/side cohan smile.png"
image side cohan think side = "images/Cohan/Sides/side cohan think side.png"
image side cohan thinking eyes closed = "images/Cohan/Sides/side cohan thinking eyes closed.png"
image side cohan thinking mad = "images/Cohan/Sides/side cohan thinking mad.png"
image side cohan thinking sad = "images/Cohan/Sides/side cohan thinking sad.png"
image side cohan thinking = "images/Cohan/Sides/side cohan thinking.png"
Last edited by Braydxne on Wed Sep 20, 2017 8:28 pm, edited 1 time in total.

User avatar
Black Cat 2412
Regular
Posts: 74
Joined: Wed Aug 16, 2017 10:10 am
Projects: Rapunzel: A classic retold
Deviantart: BlackCat2412
Location: Vietnam
Contact:

Re: Showing Side Images Without Main Character Talking

#2 Post by Black Cat 2412 »


User avatar
Braydxne
Regular
Posts: 50
Joined: Tue Aug 08, 2017 4:03 am
Projects: DR: Chains of Trust
Contact:

Re: Showing Side Images Without Main Character Talking

#3 Post by Braydxne »

Black Cat 2412 wrote: Thu Sep 14, 2017 8:13 am I hope this help: viewtopic.php?f=8&t=45362&p=462883#p462883
This sort of worked, but now it shows both the side image AND the full body image. Thank you for trying to help though, and getting me somewhere! :)

User avatar
Black Cat 2412
Regular
Posts: 74
Joined: Wed Aug 16, 2017 10:10 am
Projects: Rapunzel: A classic retold
Deviantart: BlackCat2412
Location: Vietnam
Contact:

Re: Showing Side Images Without Main Character Talking

#4 Post by Black Cat 2412 »

Is the problem still bothering you? Then I have found a great solution for it (from my view at least ^^)
Here you go:

Code: Select all

##  Declare characters here
define config.layers = [ 'master', 'transient','screens','character', 'overlay' ] #make a whole new layer for the char- screw side image(i never quite get it anyway)!
define config.tag_layer = {'cohan':'character'}  #tag it so every cohan image is automatically place on the 'character' layer. Alternatively, you can use "onlayer" to manually put him in there every time
define config.menu_clear_layers = ['character'] # clear it so the char will disappear when enter game screen, otherwise he will awkwardly stay there
  
define co = Character("Cohan", image="cohan")
label start:
 co "Now I will always appear even if other chars is speaking!"
Advantage: no more defining a bunch of side_image (it save you a lot of code). Now all you have to do is simply put the image with correct name in the game directory
The only catch (that I have managed to find so far)? Is that now the "screen" statement won't affect cohan anymore: if you want his image to be cleared you have to manually hide it (But seeing that he is the main char I don not think that will happen a lot)

User avatar
Braydxne
Regular
Posts: 50
Joined: Tue Aug 08, 2017 4:03 am
Projects: DR: Chains of Trust
Contact:

Re: Showing Side Images Without Main Character Talking

#5 Post by Braydxne »

Black Cat 2412 wrote: Sun Sep 17, 2017 4:24 am Is the problem still bothering you? Then I have found a great solution for it (from my view at least ^^)
Here you go:

Code: Select all

##  Declare characters here
define config.layers = [ 'master', 'transient','screens','character', 'overlay' ] #make a whole new layer for the char- screw side image(i never quite get it anyway)!
define config.tag_layer = {'cohan':'character'}  #tag it so every cohan image is automatically place on the 'character' layer. Alternatively, you can use "onlayer" to manually put him in there every time
define config.menu_clear_layers = ['character'] # clear it so the char will disappear when enter game screen, otherwise he will awkwardly stay there
  
define co = Character("Cohan", image="cohan")
label start:
 co "Now I will always appear even if other chars is speaking!"
Advantage: no more defining a bunch of side_image (it save you a lot of code). Now all you have to do is simply put the image with correct name in the game directory
The only catch (that I have managed to find so far)? Is that now the "screen" statement won't affect cohan anymore: if you want his image to be cleared you have to manually hide it (But seeing that he is the main char I don not think that will happen a lot)
Thank you for this!

Post Reply

Who is online

Users browsing this forum: Google [Bot]