Ren'Py Disable the "advance" function so users don't skip slideshow

ChaosOpen

Well-Known Member
Game Developer
Sep 26, 2019
1,013
2,133
There's always a better way to do things in RenPy.

There's always things you would do different/better next time around. Which isn't to say it wasn't "good enough" this time around.

The biggest pitfalls are those things you think are working as intended, but aren't. But you can't know what you don't know - so don't sweat it. If you're happy with your solution, that's enough for right now in most cases.

As for call screen -vs- show screen...
  • show screen displays a predefined screen onto the game UI, then the game immediately continues.
  • call screen does more or less the same, except the game effectively stops and waits for the player to click on something that triggers an action before it executes that action. Depending on the action, the game may continue on the next line, or jump somewhere else.
Can I do something like this with the call command?
studentmenu.jpg
Just, I think asking users to remember 6 names the first time they hear them is a bit much, and it's supposed to be a menu which allows the user to select a girl from a visual picture as opposed to a name.

I believe the easiest way would be to use imagebuttons right?
 

obsessionau

Member
Game Developer
Sep 27, 2018
268
368
Would something like this work?:
Python:
label start:
    ...
    show student_pics #show characters on the screen for player to select
    jump student_select

    return

label student_select: # Game will stay here until the player selects a character
    pause
    jump student_select

    return

screen student_pics: #position this screen where you want ontop of your scene.
    hbox:
        imagebutton:
            idle LiveComposite((54, 79), (0, 0), "student.png", (10, 0), (folderIcon + "face.png"), (10, 0), AlphaBlend(folderIcon + getattr(store,dungeon[roomA][4] + "HMask"), Solid("#0000"), Solid(getattr(store,dungeon[roomA][4] + "HColour")), alpha=True), (10, 0),  folderIcon + getattr(store, dungeon[roomA][4] + "HTexture"))
            action [SetVariable("studentClicked", roomA), SetVariable("studentSelected", 0), Call("playerTalk")] at fadeIn
I just copy pasted the image button so it is more complex than it needs as in this case it does a live Composite of the character.
 

ChaosOpen

Well-Known Member
Game Developer
Sep 26, 2019
1,013
2,133
Would something like this work?:
Python:
label start:
    ...
    show student_pics #show characters on the screen for player to select
    jump student_select

    return

label student_select: # Game will stay here until the player selects a character
    pause
    jump student_select

    return

screen student_pics: #position this screen where you want ontop of your scene.
    hbox:
        imagebutton:
            idle LiveComposite((54, 79), (0, 0), "student.png", (10, 0), (folderIcon + "face.png"), (10, 0), AlphaBlend(folderIcon + getattr(store,dungeon[roomA][4] + "HMask"), Solid("#0000"), Solid(getattr(store,dungeon[roomA][4] + "HColour")), alpha=True), (10, 0),  folderIcon + getattr(store, dungeon[roomA][4] + "HTexture"))
            action [SetVariable("studentClicked", roomA), SetVariable("studentSelected", 0), Call("playerTalk")] at fadeIn
I just copy pasted the image button so it is more complex than it needs as in this case it does a live Composite of the character.
It might, but I can't make heads or tails of it, so even if it was the "correct answer" it doesn't help me because I don't know how to apply it.
 

obsessionau

Member
Game Developer
Sep 27, 2018
268
368
Not sure if this is what you are after:

1616569319295.png
Added a hover image to indicate these pics are doing something...
1616569369066.png

1616569418054.png

Here is ALL the code for this, I would recommend you create a new project and play around to really understand how it works:

Python:
label start:
    scene room
    show screen displayGirls
    "Whose story would you like to hear?"
    jump storyloop

    return

label storyloop:
    pause
    jump storyloop

label story(girl):
    hide screen displayGirls
    if girl == 1:
        "This is the pink girls story"
    elif girl == 2:
        "This is the blue haired girls story"
    elif girl == 3:
        "This is the aqua haired girls story"
    elif girl == 4:
        "This is the red haired girls story"
    elif girl == 5:
        "This is the blonde haired girls story"
    elif girl == 6:
        "This is the black haired girls story"

    jump start

    return

screen displayGirls:
    zorder 1
    vbox:
        xpos 650
        ypos 330
        spacing 10
        hbox:
            spacing 10
            imagebutton background "gpink.png" idle "gpink.png" hover "hilight.png" action Call("story",1)
            imagebutton background "gblue.png" idle "gblue.png" hover "hilight.png" action Call("story",2)
            imagebutton background "gauqa.png" idle "gauqa.png" hover "hilight.png" action Call("story",3)
        hbox:
            spacing 10
            imagebutton background "gred.png" idle "gred.png" hover "hilight.png" action Call("story",4)
            imagebutton background "gblonde.png" idle "gblonde.png" hover "hilight.png" action Call("story",5)
            imagebutton background "gblack.png" idle "gblack.png" hover "hilight.png" action Call("story",6)
All you need is the pictures and a transparent hover image like this:
hilight.png
 

79flavors

Well-Known Member
Respected User
Jun 14, 2018
1,581
2,219
Can I do something like this with the call command?

The answer to that question is almost always "Yes". Frequently "Yes, but...".

One thing I need to correct pretty quickly though is that this is call screen, not call. call is a completely different RenPy/python statement and it behaves very differently at first glance. Those devs that learn how call works before they come across call screen often fall into the trap of assuming one behaves like the other, and get confused as a result (I certainly did for a while). I don't believe that's the case here with you... I'm just covering all the angles.

[...] it's supposed to be a menu which allows the user to select a girl from a visual picture as opposed to a name.

Yup. Easily.
Though "easily" is relative.
obsessionau has already offered you one solution. As should be evident at this point, there are a lot more possibilities.
For example, I personally would use action Jump("girl-label") or perhaps action Return("girl_name"). I might also include code so that the list of girls still works, even if you haven't met/unlocked the girl yet.

Personally I don't like the use of show screen and the use of label storyloop, as doing it this way causes no end of problems for people (like me) who use the "auto advance" functionality of RenPy. It relies on the pause stopping the game continuing so the player can pick a girl - but the [auto] quick_menu button craps all over that.

I believe the easiest way would be to use imagebuttons right?

Almost certainly. I personally prefer imagebutton over something like imagemap+hotspot - mainly because hotspot can only create rectangular/square clickable areas. Though that could actually be appropriate here.

Then beyond that are the "artsy" aspects. Making it prettier than just a series of rectangular images. It could be made to look like a mobile phone screen for example or a diary or "little black book". Again, personally I have all the artistic abilities of a lump of coal, so I'd probably only go as far as making the images circular rather than square.

Taking obsessionau's code as my starting point and calling my girls "Amber", "Bella", "Chloe", "Dawn", "Emma" and "Fiona".

First, a version of the code that uses action Jump()...

Python:
default amber_available = False
default bella_available = False
default chloe_available = False
default dawn_available = False
default emma_available = False
default fiona_available = False


label start:

    scene black with fade
    "*** THE START ***"

    $ amber_available = True
    $ emma_available = True


label storyloop:
  
    scene room with fade
    call screen displayGirls


label the_end:

    scene black with fade
    "*** THE END ***"

    return


label ambers_story:
    "*** BLAH, BLAH, Amber ***"
    jump storyloop

label bellas_story:
    "*** BLAH, BLAH, Bella ***"
    jump storyloop

label chloes_story:
    "*** BLAH, BLAH, Chloe ***"
    jump storyloop

label dawns_story:
    "*** BLAH, BLAH, Dawn ***"
    jump storyloop

label emmas_story:
    "*** BLAH, BLAH, Emma ***"
    jump storyloop

label fionas_story:
    "*** BLAH, BLAH, Fiona ***"
    jump storyloop


screen displayGirls():
    zorder 1
    modal True
    vbox:
        xpos 650
        ypos 330
        spacing 10
        hbox:
            spacing 10
            if amber_available:
                imagebutton:
                    background "amber_portrait.png"
                    idle "amber_portrait.png"
                    hover "hilight.png"
                    action Jump("ambers_story")
            else:
                imagebutton:
                    idle "questionmark_portrait.png"
                    action NullAction()
                  
            if bella_available:
                imagebutton:
                    background "bella_portrait.png"
                    idle "bella_portrait.png"
                    hover "hilight.png"
                    action Jump("bellas_story")
            else:
                imagebutton:
                    idle "questionmark_portrait.png"
                    action NullAction()
                  
            if chloe_available:
                imagebutton:
                    background "chloe_portrait.png"
                    idle "chloe_portrait.png"
                    hover "hilight.png"
                    action Jump("chloes_story")
            else:
                imagebutton:
                    idle "questionmark_portrait.png"
                    action NullAction()
                  
        hbox:
            spacing 10
            if amber_available:
                imagebutton:
                    background "dawn_portrait.png"
                    idle "dawn_portrait.png"
                    hover "hilight.png"
                    action Jump("dawns_story")
            else:
                imagebutton:
                    idle "questionmark_portrait.png"
                    action NullAction()
                  
            if emma_available:
                imagebutton:
                    background "emma_portrait.png"
                    idle "emma_portrait.png"
                    hover "hilight.png"
                    action Jump("emmas_story")
            else:
                imagebutton:
                    idle "questionmark_portrait.png"
                    action NullAction()
                  
            if fiona_available:
                imagebutton:
                    background "fiona_portrait.png"
                    idle "fiona_portrait.png"
                    hover "hilight.png"
                    action Jump("fionas_story")
            else:
                imagebutton:
                    idle "questionmark_portrait.png"
                    action NullAction()

        textbutton "[ Exit ]":
            xalign 0.5
            action Jump("the_end")

Please don't let the length of my example overwhelm you. This is more or less the same as the other code - except I've got checks in to see if the girl is available and to show a different image if she's not. I've also spread the parameters downwards rather than horizontally - if only to show that it can be done that way.

I've also added modal True, which force RenPy to ignore all clickable areas that are not part of this screen. This screen becomes the focus of the player choices and the player is forced to interact with this screen before continuing.

Now the limitation of this design is that the girl selection menu can only be used to jump to those specific labels. It isn't very flexible as a solution.

Enter action Return() stage right...

Python:
default amber_available = False
default bella_available = False
default chloe_available = False
default dawn_available = False
default emma_available = False
default fiona_available = False


label start:

    scene black with fade
    "*** THE START ***"

    $ amber_available = True
    $ emma_available = True


label storyloop:
  
    scene room with fade
    call screen displayGirls

    if _return == "amber":
        jump ambers_story
      
    elif _return == "bella":
        jump bellas_story
  
    elif _return == "chloe":
        jump chloes_story
  
    elif _return == "dawn":
        jump dawns_story
  
    elif _return == "emma":
        jump emmas_story
  
    elif _return == "fiona":
        jump fionas_story
  

label the_end:

    scene black with fade
    "*** THE END ***"

    return


label ambers_story:
    "*** BLAH, BLAH, Amber ***"
    jump storyloop

label bellas_story:
    "*** BLAH, BLAH, Bella ***"
    jump storyloop

label chloes_story:
    "*** BLAH, BLAH, Chloe ***"
    jump storyloop

label dawns_story:
    "*** BLAH, BLAH, Dawn ***"
    jump storyloop

label emmas_story:
    "*** BLAH, BLAH, Emma ***"
    jump storyloop

label fionas_story:
    "*** BLAH, BLAH, Fiona ***"
    jump storyloop


screen displayGirls():
    zorder 1
    modal True
    vbox:
        xpos 650
        ypos 330
        spacing 10
        hbox:
            spacing 10
            if amber_available:
                imagebutton:
                    background "amber_portrait.png"
                    idle "amber_portrait.png"
                    hover "hilight.png"
                    action Return("amber")
            else:
                imagebutton:
                    idle "questionmark_portrait.png"
                    action NullAction()
                  
            if bella_available:
                imagebutton:
                    background "bella_portrait.png"
                    idle "bella_portrait.png"
                    hover "hilight.png"
                    action Return("bella")
            else:
                imagebutton:
                    idle "questionmark_portrait.png"
                    action NullAction()
                  
            if chloe_available:
                imagebutton:
                    background "chloe_portrait.png"
                    idle "chloe_portrait.png"
                    hover "hilight.png"
                    action Return("chloe")
            else:
                imagebutton:
                    idle "questionmark_portrait.png"
                    action NullAction()
                  
        hbox:
            spacing 10
            if amber_available:
                imagebutton:
                    background "dawn_portrait.png"
                    idle "dawn_portrait.png"
                    hover "hilight.png"
                    action Return("dawn")
            else:
                imagebutton:
                    idle "questionmark_portrait.png"
                    action NullAction()
                  
            if emma_available:
                imagebutton:
                    background "emma_portrait.png"
                    idle "emma_portrait.png"
                    hover "hilight.png"
                    action Return("emma")
            else:
                imagebutton:
                    idle "questionmark_portrait.png"
                    action NullAction()
                  
            if fiona_available:
                imagebutton:
                    background "fiona_portrait.png"
                    idle "fiona_portrait.png"
                    hover "hilight.png"
                    action Return("fiona")
            else:
                imagebutton:
                    idle "questionmark_portrait.png"
                    action NullAction()

        textbutton "[ Exit ]":
            xalign 0.5
            action Return("the_end")

At first glance, these examples are almost identical (deliberately on my part), however the second one is much more flexible. As call screen displayGirls can be used and reused in different ways throughout the game. I might even go so far as to rename the screen screen girlChooser()

I'm effectively using action Return() to return a string back to the game. That string is stored in a reserved variable called _return and it's that I check when I return from the call screen.

This solution isn't no better or worse than any other solution. Obviously, I prefer it... but then I would, wouldn't I?

Honestly, this is not how I would actually end up writing it right now. I recently discovered Lists, Dicts and other array type variables. I'd probably have a custom Class to store the list of girls names, the filename of their image and whether they have been unlocked or not yet. Then I'd remove most of the screen code and add a loop to extract the information from my custom List to build the screen dynamically. It's all just about keeping things as simple as possible, depending on what you already know.

Hope this helps. If only to compare with the other solutions offered.
 
Last edited:

ChaosOpen

Well-Known Member
Game Developer
Sep 26, 2019
1,013
2,133
The answer to that question is almost always "Yes". Frequently "Yes, but...".

One thing I need to correct pretty quickly though is that this is call screen, not call. call is a completely different RenPy/python statement and it behaves very differently at first glance. Those devs that learn how call works before they come across call screen often fall into the trap of assuming one behaves like the other, and get confused as a result (I certainly did for a while). I don't believe that's the case here with you... I'm just covering all the angles.




Yup. Easily.
Though "easily" is relative.
obsessionau has already offered you one solution. As should be evident at this point, there are a lot more possibilities.
For example, I personally would use action Jump("girl-label") or perhaps action Return("girl_name"). I might also include code so that the list of girls still works, even if you haven't met/unlocked the girl yet.

Personally I don't like the use of show screen and the use of label storyloop, as doing it this way causes no end of problems for people (like me) who use the "auto advance" functionality of RenPy. It relies on the pause stopping the game continuing so the player can pick a girl - but the [auto] quick_menu button craps all over that.




Almost certainly. I personally prefer imagebutton over something like imagemap+hotspot - mainly because hotspot can only create rectangular/square clickable areas. Though that could actually be appropriate here.

Then beyond that are the "artsy" aspects. Making it prettier than just a series of rectangular images. It could be made to look like a mobile phone screen for example or a diary or "little black book". Again, personally I have all the artistic abilities of a lump of coal, so I'd probably only go as far as making the images circular rather than square.

Taking obsessionau's code as my starting point and calling my girls "Amber", "Bella", "Chloe", "Dawn", "Emma" and "Fiona".

First, a version of the code that uses action Jump()...

Python:
default amber_available = False
default bella_available = False
default chloe_available = False
default dawn_available = False
default emma_available = False
default fiona_available = False


label start:

    scene black with fade
    "*** THE START ***"

    $ amber_available = True
    $ emma_available = True


label storyloop:

    scene room with fade
    call screen displayGirls


label the_end:

    scene black with fade
    "*** THE END ***"

    return


label ambers_story:
    "*** BLAH, BLAH, Amber ***"
    jump storyloop

label bellas_story:
    "*** BLAH, BLAH, Bella ***"
    jump storyloop

label chloes_story:
    "*** BLAH, BLAH, Chloe ***"
    jump storyloop

label dawns_story:
    "*** BLAH, BLAH, Dawn ***"
    jump storyloop

label emmas_story:
    "*** BLAH, BLAH, Emma ***"
    jump storyloop

label fionas_story:
    "*** BLAH, BLAH, Fiona ***"
    jump storyloop


screen displayGirls():
    zorder 1
    modal True
    vbox:
        xpos 650
        ypos 330
        spacing 10
        hbox:
            spacing 10
            if amber_available:
                imagebutton:
                    background "amber_portrait.png"
                    idle "amber_portrait.png"
                    hover "hilight.png"
                    action Jump("ambers_story")
            else:
                imagebutton:
                    idle "questionmark_portrait.png"
                    action NullAction()
             
            if bella_available:
                imagebutton:
                    background "bella_portrait.png"
                    idle "bella_portrait.png"
                    hover "hilight.png"
                    action Jump("bellas_story")
            else:
                imagebutton:
                    idle "questionmark_portrait.png"
                    action NullAction()
             
            if chloe_available:
                imagebutton:
                    background "chloe_portrait.png"
                    idle "chloe_portrait.png"
                    hover "hilight.png"
                    action Jump("chloes_story")
            else:
                imagebutton:
                    idle "questionmark_portrait.png"
                    action NullAction()
             
        hbox:
            spacing 10
            if amber_available:
                imagebutton:
                    background "dawn_portrait.png"
                    idle "dawn_portrait.png"
                    hover "hilight.png"
                    action Jump("dawns_story")
            else:
                imagebutton:
                    idle "questionmark_portrait.png"
                    action NullAction()
             
            if emma_available:
                imagebutton:
                    background "emma_portrait.png"
                    idle "emma_portrait.png"
                    hover "hilight.png"
                    action Jump("emmas_story")
            else:
                imagebutton:
                    idle "questionmark_portrait.png"
                    action NullAction()
             
            if fiona_available:
                imagebutton:
                    background "fiona_portrait.png"
                    idle "fiona_portrait.png"
                    hover "hilight.png"
                    action Jump("fionas_story")
            else:
                imagebutton:
                    idle "questionmark_portrait.png"
                    action NullAction()

        textbutton "[ Exit ]":
            xalign 0.5
            action Jump("the_end")

Please don't let the length of my example overwhelm you. This is more or less the same as the other code - except I've got checks in to see if the girl is available and to show a different image if she's not. I've also spread the parameters downwards rather than horizontally - if only to show that it can be done that way.

I've also added modal True, which force RenPy to ignore all clickable areas that are not part of this screen. This screen becomes the focus of the player choices and the player is forced to interact with this screen before continuing.

Now the limitation of this design is that the girl selection menu can only be used to jump to those specific labels. It isn't very flexible as a solution.

Enter action Return() stage right...

Python:
default amber_available = False
default bella_available = False
default chloe_available = False
default dawn_available = False
default emma_available = False
default fiona_available = False


label start:

    scene black with fade
    "*** THE START ***"

    $ amber_available = True
    $ emma_available = True


label storyloop:

    scene room with fade
    call screen displayGirls

    if _return == "amber":
        jump ambers_story
 
    elif _return == "bella":
        jump bellas_story

    elif _return == "chloe":
        jump chloes_story

    elif _return == "dawn":
        jump dawns_story

    elif _return == "emma":
        jump emmas_story

    elif _return == "fiona":
        jump fionas_story


label the_end:

    scene black with fade
    "*** THE END ***"

    return


label ambers_story:
    "*** BLAH, BLAH, Amber ***"
    jump storyloop

label bellas_story:
    "*** BLAH, BLAH, Bella ***"
    jump storyloop

label chloes_story:
    "*** BLAH, BLAH, Chloe ***"
    jump storyloop

label dawns_story:
    "*** BLAH, BLAH, Dawn ***"
    jump storyloop

label emmas_story:
    "*** BLAH, BLAH, Emma ***"
    jump storyloop

label fionas_story:
    "*** BLAH, BLAH, Fiona ***"
    jump storyloop


screen displayGirls():
    zorder 1
    modal True
    vbox:
        xpos 650
        ypos 330
        spacing 10
        hbox:
            spacing 10
            if amber_available:
                imagebutton:
                    background "amber_portrait.png"
                    idle "amber_portrait.png"
                    hover "hilight.png"
                    action Return("amber")
            else:
                imagebutton:
                    idle "questionmark_portrait.png"
                    action NullAction()
             
            if bella_available:
                imagebutton:
                    background "bella_portrait.png"
                    idle "bella_portrait.png"
                    hover "hilight.png"
                    action Return("bella")
            else:
                imagebutton:
                    idle "questionmark_portrait.png"
                    action NullAction()
             
            if chloe_available:
                imagebutton:
                    background "chloe_portrait.png"
                    idle "chloe_portrait.png"
                    hover "hilight.png"
                    action Return("chloe")
            else:
                imagebutton:
                    idle "questionmark_portrait.png"
                    action NullAction()
             
        hbox:
            spacing 10
            if amber_available:
                imagebutton:
                    background "dawn_portrait.png"
                    idle "dawn_portrait.png"
                    hover "hilight.png"
                    action Return("dawn")
            else:
                imagebutton:
                    idle "questionmark_portrait.png"
                    action NullAction()
             
            if emma_available:
                imagebutton:
                    background "emma_portrait.png"
                    idle "emma_portrait.png"
                    hover "hilight.png"
                    action Return("emma")
            else:
                imagebutton:
                    idle "questionmark_portrait.png"
                    action NullAction()
             
            if fiona_available:
                imagebutton:
                    background "fiona_portrait.png"
                    idle "fiona_portrait.png"
                    hover "hilight.png"
                    action Return("fiona")
            else:
                imagebutton:
                    idle "questionmark_portrait.png"
                    action NullAction()

        textbutton "[ Exit ]":
            xalign 0.5
            action Return("the_end")

At first glance, these examples are almost identical (deliberately on my part), however the second one is much more flexible. As call screen displayGirls can be used and reused in different ways throughout the game. I might even go so far as to rename the screen screen girlChooser()

I'm effectively using action Return() to return a string back to the game. That string is stored in a reserved variable called _return and it's that I check when I return from the call screen.

This solution isn't no better or worse than any other solution. Obviously, I prefer it... but then I would, wouldn't I?

Honestly, this is not how I would actually end up writing it right now. I recently discovered Lists, Dicts and other array type variables. I'd probably have a custom Class to store the list of girls names, the filename of their image and whether they have been unlocked or not yet. Then I'd remove most of the screen code and add a loop to extract the information from my custom List to build the screen dynamically. It's all just about keeping things as simple as possible, depending on what you already know.

Hope this helps. If only to compare with the other solutions offered.
It is all being set up in service of letting the user go around and see the girls story round robin style each time, in service to that, I spent an hour in photoshop(LONG before I made this thread) making:

Each time they watch six chapters, one for each girl, every time the screen comes up, though they can watch any of their stories in any order they want. Once they watch their story, the button becomes insensisitive and they can move onto the next girl. So, once I go to the call screen they can will click on all six pictures or only one picture. To give you an idea, here it is in menu form:

Code:
label first_day_student_meet:
    scene student_menu_1 with fade
    menu:
        "Whose story would you like to hear?"
        "Karen Erikson" if karen_aff == 0:
            $ karen_aff += 1
            jump karen_claire_cunni_roof
        "Kendal Brown" if kendal_aff == 0:
            $ kendal_aff += 1
            jump first_day_gym_with_kendal
        "Sarah Smith" if sarah_aff == 0:
            $ sarah_aff += 1
            jump sarahs_past_with_mother
        "Emily Lombardo" if emily_aff == 0:
            $ emily_aff += 1
            jump emily_in_library_first_day
        "Amber McDowell" if amber_aff == 0:
            $ amber_aff += 1
            jump amber_firstday_computer_lab
        "Klaara Lepik" if klaara_aff == 0:
            $ klaara_aff += 1
            jump klaara_firstday_library
        "Continue the story" if amber_aff == 1 or emily_aff == 1 or sarah_aff == 1 or kendal_aff == 1 or karen_aff == 1 or klaara_aff == 1:
            jump first_meet_isabella
It gives them the option to romance one girl or all six(they are side girls and don't affect the main plot), but once they see their chapter, the option disappears and a first time watcher can simply go down the list until they are only left with "continue the story" after which they will go back to the overarcing narrative. However, each time it clicks up, so when they see the screen again, anyone whose story they have see will show up and they can then see chapter 2 of their story.

So, I need a screen which jumps them to a girl's story chapter, then brings them back to that screen with the picture greyed out, then allowing them to select a different girl, and go through her chapter, then after they have seen what they want to(assuming it is at least one girl) they can move on. Then when I bring it up for all of the girl's chapter 2 the stories are color again and will take them to new locations.

This process needs to be repeated 5 times, as each girl has a 5 part individual story exclusive to her.

Code:
default amber_aff = 0
default karen_aff = 0
default sarah_aff = 0
default klaara_aff = 0
default emily_aff = 0
default kendal_aff = 0

label start:
    scene story_pictures
    "story stuff"
    "plot stuff"
label first_girl_story:
    call screen displaygirls
label amber_story_one:
    "blah blah"
    $ amber_aff += 1
    jump first_girl_story
label emily_story_one:
    "blah blah"
    $ emily_aff += 1
    jump first_girl_story
label karen_story_one:
    "blah blah"
    $ karen_aff += 1
    jump first_girl_story
label kendal_story_one:
    "blah blah"
    $ kendal_aff += 1
    jump first_girl_story
label klaara_story_one:
    "blah blah"
    $ klaara_aff += 1
    jump first_girl_story
label sarah_story_one:
    "blah blah"
    $ sarah_aff += 1
    jump first_girl_story

label displaygirls:
    zorder 1
    modal True
    vbox:
        xpos 650
        ypos 330
        spacing 10
        hbox:
            spacing 10
            if amber_aff == 0:
                imagebutton:
                    hover "amber_menu_hover.png"
                    idle "amber_menu_idle.png"
                    action jump("amber_story_one")
            else:
                imagebutton:
                
                    NullAction()
            auto "amber_menu_%s.png"??????????????????????????????????????????????????
 
Last edited:

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Donor
Respected User
Jun 10, 2017
10,363
15,280
Would something like this work?:
The answer is : yes but if the player is skipping, decided to skip transition, or use the auto-advance with a too slow value, he then risk to face an infinite loop exception, or to saturate the CPU if he use a low cost mobile device.
 

79flavors

Well-Known Member
Respected User
Jun 14, 2018
1,581
2,219
auto "amber_menu_%s.png" ??????????????????????????????????????????????????

It's just a shortcut.
auto replaces the %s with whatever image type it needs, based on the statement it's used in and whether it finds a matching filename in the /images/ folder.

So it automatically replaces %s with idle, hover or insensitive in this example.

Rather than continue to offer code snippets... how about you just try it...