Skip to main content

On Sale: GamesAssetsToolsTabletopComics
Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

I know it's too late to offer advice, but what I do for layered images with variables is just use the variable within the layered image itself.

layeredimage brianne:

    group hair:
        auto
        attribute hair default:
            "brianne_hair_[haircolor]"

Then all you have to do is change the variable based on what the user selects. And if you set it as the default layer, then it'll automatically show it whenever the character appears on screen. Much more simpler than bothering with condition switches.

Being self-taught programmer, when I first started playing around with layered images, I searched everywhere for a solution to this, but couldn't find one and eventually just had to mess around with it before I figured out how to do it myself. It's all just trial and error. :3

Also if you want to do it with something that has more than one attribute (such as eyes that change expressions), then you just have to do this for each attribute.

group eyes:

        auto
        attribute neutral default:
            "brianne_eyes_neutral_[eyecolor]"

        attribute angry:
            "brianne_eyes_angry_[eyecolor]"

        attribute sad:
            "brianne_eyes_sad_[eyecolor]"

        attribute surprise:
            "brianne_eyes_surprise_[eyecolor]"

        attribute irritated:
            "brianne_eyes_irritated_[eyecolor]"

        attribute flirt:
            "brianne_eyes_flirt_[eyecolor]"

(1 edit) (+1)

oh my gosh, thank you so much for this!! I was really struggling with the condition switches but knowing this I can probably implement things better next time, so thank you!

- Summer

You're welcome, happy to help! ^_^