- Sep 16, 2022
- 50
- 9
The answer is "yes" to both. There's no image named "mc1", but you are also missing the first line of his code.mc1 is not there, just a folder named mc, or am I missing something?
# Define the Character object, change the name by what you want.
define mc = Character( "Joey", image="mc" )
# Manually define the neutral side image.
# This is optional, see comment below.
image side mc neutral = "os_neutral2.jpg"
label chapter1:
show ap
# Select the neutral side image to display.
mc neutral "Do you like this world ?"
# The previous side image will be displayed until you define another one.
mc "This shelfish world where people don't care about anyone except themselves."
"Some narration for the example."
# The side image stay defined even if another character talked in between.
mc "Hey, it's me, [mc]."
image
property when you create the Character
object.mc1 is not there, just a folder named mc, or am I missing something?
Edit if mc1 is in that folder it needs to be mc/mc1 (I think, its late)
Thank you both, I guess I was just being a dumbass.The answer is "yes" to both. There's no image named "mc1", but you are also missing the first line of his code.
DirtyPants what are you trying to do exactly ?
You start by creating aYou must be registered to see the linksobject, therefore the object used to handle the dialogs. But you are providing it an image name in place of the name of the character. Then you are using this object to both display an image and dialog lines ; the first not working because there's no image named "mc1".
My guess is that you are trying to use what is calledYou must be registered to see the links. If it's the case, your code should looks like this:
Alternatively to the manual definition of each side image, you can also rely on Ren'PyPython:# Define the Character object, change the name by what you want. define mc = Character( "Joey", image="mc" ) # Manually define the neutral side image. # This is optional, see comment below. image side mc neutral = "os_neutral2.jpg" label chapter1: show ap # Select the neutral side image to display. mc neutral "Do you like this world ?" # The previous side image will be displayed until you define another one. mc "This shelfish world where people don't care about anyone except themselves." "Some narration for the example." # The side image stay defined even if another character talked in between. mc "Hey, it's me, [mc]."
You must be registered to see the links.
In the "images" folder, create a sub folder (named whatever you want). In it, put your "os_neutral2.jpg" image, but rename it "side mc neutral.jpg".
With this, Ren'Py will automatically create the side images, avoiding you to have to declare them all manually. But you still need theimage
property when you create theCharacter
object.
If you knew the number of times where professionals read the documentation again...Time to read the documentation again :')
Personally, I don't declare a "neutral" side image. Instead, I just use the character's declared image name (in this example "mc")The answer is "yes" to both. There's no image named "mc1", but you are also missing the first line of his code.
DirtyPants what are you trying to do exactly ?
You start by creating aYou must be registered to see the linksobject, therefore the object used to handle the dialogs. But you are providing it an image name in place of the name of the character. Then you are using this object to both display an image and dialog lines ; the first not working because there's no image named "mc1".
My guess is that you are trying to use what is calledYou must be registered to see the links. If it's the case, your code should looks like this:
Alternatively to the manual definition of each side image, you can also rely on Ren'PyPython:# Define the Character object, change the name by what you want. define mc = Character( "Joey", image="mc" ) # Manually define the neutral side image. # This is optional, see comment below. image side mc neutral = "os_neutral2.jpg" label chapter1: show ap # Select the neutral side image to display. mc neutral "Do you like this world ?" # The previous side image will be displayed until you define another one. mc "This shelfish world where people don't care about anyone except themselves." "Some narration for the example." # The side image stay defined even if another character talked in between. mc "Hey, it's me, [mc]."
You must be registered to see the links.
In the "images" folder, create a sub folder (named whatever you want). In it, put your "os_neutral2.jpg" image, but rename it "side mc neutral.jpg".
With this, Ren'Py will automatically create the side images, avoiding you to have to declare them all manually. But you still need theimage
property when you create theCharacter
object.
I agree with your reason, but I prefered to keep his example. It lead to less confusion when it come to understand the code.Personally, I don't declare a "neutral" side image.
There's a backward compatibility issue with underscores, and the documentation isn't always up to date regarding images due to this.One thing I have noticed though, is that the official documentation tends to use underscores, which I assume is because of a legacy from UNIX. And TBH, I tend to use underscores a lot - but only because I have been using computers a long time and try to avoid file naming convention do-overs. But with these side images and Ren'py, I do now make them with clear spaces and so far everything still functions OK. (including my no "neutral" lazyness, lol)
image
objects was stripping underscores, replacing them by spaces. At some point the method used changed, not stripping the underscores anymore, then it changed again with the 7.x branch, but still not stripping the underscores.show stripped image
and show stripped_images
would works. This can be really confusing and don't help to stay attentive to what you write in your code.