Dressup for custom character

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
Tessiellation
Regular
Posts: 48
Joined: Sat Oct 07, 2017 11:21 am
Contact:

Dressup for custom character

#1 Post by Tessiellation »

Hello, I'm trying to make it possible for people to create custom characters.
I've recently figured out how to use layered images, via baiyu.

The only thing I can't seem to get to work is the dress up game.

I thought SetVariable would search for any images containing the word hair, but wouldn't seem to be the case :S Anyone who could enlighten me how this work?

Code: Select all

nit python:
    outfit, hair  = 1, 1 # default dressup items
    outfit_styles_num, hair_styles_num = 3, 3 # number of styles for each dressup item

screen dressup_example():

    ## Ensure this appears on top of other screens.
    zorder 100

    frame:

        xalign 0.5
        xsize 700
        yfill True

        hbox:

            xalign 0.5
            yalign 0.15
            spacing 400

            textbutton _("<") action SetVariable('hair', max(hair-1,0))
            textbutton _(">") action SetVariable('hair',min(hair+1,hair_styles_num))

        add "base.png" xalign 0.5

Post Reply

Who is online

Users browsing this forum: No registered users