layered image with eyes blinking ATL Block

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
wyverngem
Miko-Class Veteran
Posts: 615
Joined: Mon Oct 03, 2011 7:27 pm
Completed: Simple as Snow, Lady Luck's Due,
Projects: Aether Skies, Of the Waterfall
Tumblr: casting-dreams
itch: castingdreams
Location: USA
Contact:

layered image with eyes blinking ATL Block

#1 Post by wyverngem »

I have a layeredimage I'm trying to set up to have different eye colors as well as a blinking animation. However, I'm not sure how to incorporate the ATL Block within the layered image that allows me to change the color of the eyes as well as blinking. Here's my ATL that works, but isn't a part of the layeredimage.

Code: Select all

image eileen_eyes:
    "eileen_eyes_[eye_color]_open"
    choice:
        pause 6
    choice:
        pause 10
    choice:
        pause 4
    "eileen_eyes_blink"
    pause 0.1
    "eileen_eyes_[eye_color]_open_half"
    pause 0.1
    repeat
My setup for the image files:
Eileen is my base.
Eyes are the group.
Eye color is a variant.
Open is an attribute.

My question is how do I incorporate the code above into a layeredimage?

So here's my set up for my code right now:

Code: Select all

layeredimage eir:
    always "eileen_base"
    group eyes auto:
        pos (203, 241)
        attribute open default
        attribute blink:
            "eir_eyes_blink"

User avatar
MaydohMaydoh
Regular
Posts: 165
Joined: Mon Jul 09, 2018 5:49 am
Projects: Fuwa Fuwa Panic
Tumblr: maydohmaydoh
Location: The Satellite of Love
Contact:

Re: layered image with eyes blinking ATL Block

#2 Post by MaydohMaydoh »

I think you just need to add the defined image into the layeredimage like normal

Code: Select all

image eileen_eyes_normal:
    "eileen_eyes_[eye_color]_open"
    choice:
        pause 6
    choice:
        pause 10
    choice:
        pause 4
    "eileen_eyes_blink"
    pause 0.1
    "eileen_eyes_[eye_color]_open_half"
    pause 0.1
    repeat

layeredimage eileen:
    always "eileen_base"

    group eyes auto:
        attribute normal default
Not sure if a dynamic image will work with it though, so have to try it and find out.

Edit: Did a quick test and it works.

Post Reply

Who is online

Users browsing this forum: No registered users