Nested layeredimages in 7.1.3 - passing attributes?

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
mikolajspy
Regular
Posts: 169
Joined: Sun Jun 04, 2017 12:05 pm
Completed: Jake's Love Story, NEKOKORO
Projects: Courage for a Kiss
Deviantart: mikolajspy
Location: Wrocław, Poland
Contact:

Nested layeredimages in 7.1.3 - passing attributes?

#1 Post by mikolajspy » Sat Dec 01, 2018 5:10 pm

In RenPy 7.1.1 when I made nested layeredimages, it nicely passed the attribute down.
However, in 7.1.3 it stopped working.

Does anyone know how to make nested layeredimages pass the attributes in 7.1.3?
I'd really like to use 7.1.3 as it removes Lint errors for attributes which makes finding other errors much easier.

The example is simple, I'm actually using two-stage nesting in some cases and some ATL.
And no, I can't use groups as they don't allow nesting, are not so flexible for my case and I also want to keep my code cleaner and modular.
It's not exactly what I have, but should show what I'm using it for, it's much more complicated in actual project. I also use python function LayeredImage and Attributes to generate some complex stuff and 7.1.1 was passing attributes to it too.

Code: Select all

layeredimage x_mouths:
    attribute normal default:
        "/m/normal.png"
    attribute happy:
        "/m/happy.png"
        
 image x_eyes = EyesLI("x") #function that returns LayeredImage, used across many characters with different function attribute
 
layeredimage x:
    always "x/body.png
    always "x_mouths"
    always "x_eyes"
Then I just used:

Code: Select all

show x happy
and it nicely took all images within nested layeredimages and python function with attribute "happy".

So back to my question - can I make it work again on 7.1.3 or should I go back to 7.1.1?
ImageImageImage

Post Reply

Who is online

Users browsing this forum: Google [Bot], TorroesPrime