Layered Sprites

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
SmileyFace
Regular
Posts: 161
Joined: Fri Mar 04, 2011 3:44 am
Projects: The Chronicle: Elements of Time, Talents, Learning to Love (artist)
Location: Nowhere
Contact:

Layered Sprites

#1 Post by SmileyFace »

So I was trying to follow this tutorial: http://www.renpy.org/wiki/renpy/doc/coo ... t_emotions
Except I'm using many layer on top of each other.

I keep getting this error.

Code: Select all

I'm sorry, but errors were detected in your script. Please correct the
errors listed below, and try again.


On line 3 of C:\Documents and Settings\Michelle Lee\Desktop\renpy-6.11.2\Directory\The Chronicle_Elements of Time/game/script.rpy: init statement expects a non-empty block.
init:
     ^

On line 5 of C:\Documents and Settings\Michelle Lee\Desktop\renpy-6.11.2\Directory\The Chronicle_Elements of Time/game/script.rpy: image statement does not expect a block. Please check the indentation of the line after this one.
image yang = ConditionSwitch(
            "y_se == 'angermark", LiveComposite(
                (375, 480),
                (300, 600), "yangraisedrightskin.png",
                (94, 66), "yangangermark.png",
                ),
            "y_se == 'sigh", LiveComposite(
                (375, 480),
                (300, 600), "yangraisedrightskin.png",
                (94, 66), "yangsigh.png",
                ),
            "y_se == 'sweat", LiveComposite(
                (375, 480),
                (300, 600), "yangraisedrightskin.png",
                (94, 66), "yangssweatspit.png",
                ),
            "y_e == 'normal", LiveComposite(
                (375, 480),
                (300, 600), "yangraisedrightskin.png",
                (94, 66), "yangeyenormal.png",
                ),
            "y_e == 'lazy", LiveComposite(
                (375, 480),
                (300, 600), "yangraisedrightskin.png",
                (94, 66), "yangseyeslazy.png",
                ),
            "y_eb == 'rightraised", LiveComposite(
                (375, 480),
                (300, 600), "yangraisedrightskin.png",
                (94) 66), "yangeyebrowrightraised.png",
                ),

Ren'Py Version: Ren'Py 6.11.2b
This is the code I'm using.

Code: Select all

init:
image yang = ConditionSwitch(
            "y_se == 'angermark", LiveComposite(
                (375, 480),
                (300, 600), "yangraisedrightskin.png",
                (94, 66), "yangangermark.png",
                ),
            "y_se == 'sigh", LiveComposite(
                (375, 480),
                (300, 600), "yangraisedrightskin.png",
                (94, 66), "yangsigh.png",
                ),
            "y_se == 'sweat", LiveComposite(
                (375, 480),
                (300, 600), "yangraisedrightskin.png",
                (94, 66), "yangssweatspit.png",
                ),
            "y_e == 'normal", LiveComposite(
                (375, 480),
                (300, 600), "yangraisedrightskin.png",
                (94, 66), "yangeyenormal.png",
                ),
            "y_e == 'lazy", LiveComposite(
                (375, 480),
                (300, 600), "yangraisedrightskin.png",
                (94, 66), "yangseyeslazy.png",
                ),
            "y_eb == 'rightraised", LiveComposite(
                (375, 480),
                (300, 600), "yangraisedrightskin.png",
                (94) 66), "yangeyebrowrightraised.png",
                ),
            "y_b == 'heavy", LiveComposite(
                (375, 480),
                (300, 600), "yangraisedrightskin.png",
                (94, 66), "yangsheavyblush.png",
                ),
            "y_m == 'D", LiveComposite(
                (375, 480),
                (300, 600), "yangraisedrightskin.png",
                (94) 66), "yangD.png",
                ),
            "y_la == 'lineart", LiveComposite(
                (375, 480),
                (300, 600), "yangraisedrightskin.png",
                (94) 66), "yangraisedright.png",
                ),
            "y_se == None", "yangraisedrightskin.png")

label start:
show yang
$ y_la = "lineart"
e "I'm faceless..l."
$ y_m = "D"
$ y_e = "lazy"
$ y_eb = "rightraised"
$ y_se = "angerark"
$ y_la = "linart"
e "I've got eyes, eyebrows, mouth and an extra special effect thingy!~"
I'm a bit stupid with anything involving technology... sorry and thank you. o___e;

luminarious
Veteran
Posts: 353
Joined: Thu May 01, 2008 1:12 pm
Projects: Winter, winter
Location: Estonia
Contact:

Re: Layered Sprites

#2 Post by luminarious »

Instead of changing a variable, wouldn't it make more sense to make each expression a separate image? Not an image file, but a Ren'py image.

SmileyFace
Regular
Posts: 161
Joined: Fri Mar 04, 2011 3:44 am
Projects: The Chronicle: Elements of Time, Talents, Learning to Love (artist)
Location: Nowhere
Contact:

Re: Layered Sprites

#3 Post by SmileyFace »

True, but then there will be a crap load of images just for the smallest change.
So I though this would be more effective.

Post Reply

Who is online

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