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.
So I'm trying to make a character based live composite where can change the pose and give the character the correct clothes that matches that pose. The character name is Kim and I want to put calm-c1 on top of the kim calm pose. The clothes and poses are stored in a character file in the base image file of the project. The file for her is named kim.
init python:
def draw_kim(pose, cloth): #[pose] and [cloth] are function attributes
return LiveComposite(
(198, 650), #image size
(0,0), pose,
(0,0), emot,
)
init:
$k = Character ("Kim", color="#006600", image="kim")
image kim calm = draw_kim("kim calm.png","calm-c1.png") #here we're calling function and fill the attributes
init python:
def draw_kim(pose, cloth): #[pose] and [cloth] are function attributes
return LiveComposite(
(198, 650), #image size
(0,0), pose,
(0,0), emot,
)
init:
$k = Character ("Kim", color="#006600", image="kim")
image kim calm = draw_kim("kim calm.png","calm-c1.png") #here we're calling function and fill the attributes
image kim calm2 = draw_kim("kim calm 2.png","calm-c2.png")
image kim angry3 = draw_kim("kim angry.png","angry-a1.png")
and so on.
I hope it gives you idea what to do
So I just implemented your code into the game and there is one problem with it. The image only draws when the assets are in the image folder and not the kim subfolder and the image statement is removed in the character statement. I tried using path directory like "kim\kim calm.png" but it seems like the language can't interpret pathing parameters.
init python:
def draw_kim(pose, cloth): #[pose] and [cloth] are function attributes
return LiveComposite(
(198, 650), #image size
(0,0), pose,
(0,0), cloth,
)
init:
#$k = Character ("Kim", color="#006600", image='kim') old version
$k = Character ("Kim", color="#006600") #new version
image kim calm = draw_kim("kim calm.png","calm-c1.png") #here we're calling function and fill the attributes
shiza wrote: ↑Sat Sep 16, 2017 4:07 am
I tried using path directory like "kim\kim calm.png" but it seems like the language can't interpret pathing parameters.