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.
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.
## 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)
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:
## 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)