Ren'Py If statement

jon95

Member
Game Developer
Sep 29, 2018
176
393
Hello,
I want to know if there is a way to make this more simple?
Code:
hbox:
        xalign 0.5
        yalign 0.54
        if jumping:
            if b.race == 0:
                imagebutton auto "/gui/jump_%s.png":
                    xalign 0.5
                    action [Function(renpy.hide,"kid jumping sport"), Function(renpy.show,"tom jumping sport", at_list=[kid_jump]), SetVariable("jj", jj+ 1), SetVariable("b.stamina", b.stamina-1), Play("sfx3", "/sfx/click.mp3"), Play("sfx1", "/sfx/clap.mp3"), SetVariable("jumping", False)]
                    if renpy.variant("touch"):
                        at customzoom
                    else:
                        at customzoom2

            if b.race == 1:
                imagebutton auto "/gui/jump_%s.png":
                    xalign 0.5
                    action [Function(renpy.hide,"kid jumping sport"), Function(renpy.show,"j3 jumping sport", at_list=[kid_jump]), SetVariable("jj", jj+ 1), SetVariable("b.stamina", b.stamina-1), Play("sfx3", "/sfx/click.mp3"), Play("sfx1", "/sfx/clap.mp3"), SetVariable("jumping", False)]
                    if renpy.variant("touch"):
                        at customzoom
                    else:
                        at customzoom2


            if b.race == 2:
                imagebutton auto "/gui/jump_%s.png":
                    xalign 0.5
                    action [Function(renpy.hide,"kid jumping sport"), Function(renpy.show,"lee jumping sport", at_list=[kid_jump]), SetVariable("jj", jj+ 1), SetVariable("b.stamina", b.stamina-1), Play("sfx3", "/sfx/click.mp3"), Play("sfx1", "/sfx/clap.mp3"), SetVariable("jumping", False)]
                    if renpy.variant("touch"):
                        at customzoom
                    else:
                        at customzoom2

            if b.race == 3:
                imagebutton auto "/gui/jump_%s.png":
                    xalign 0.5
                    action [Function(renpy.hide,"kid jumping sport"), Function(renpy.show,"ricardo jumping sport", at_list=[kid_jump]), SetVariable("jj", jj+ 1), SetVariable("b.stamina", b.stamina-1), Play("sfx3", "/sfx/click.mp3"), Play("sfx1", "/sfx/clap.mp3"), SetVariable("jumping", False)]
                    if renpy.variant("touch"):
                        at customzoom
                    else:
                        at customzoom2


        else:
            imagebutton idle "/gui/jump_disabled.png":
                xalign 0.5
                action NullAction()
                if renpy.variant("touch"):
                    at customzoom
                else:
                    at customzoom2
            timer 1.0 action SetVariable("jumping", True)

        if jj >= 50:
            timer 0.1 action [Hide("minigame_jumping_jacks", transition=dissolve), Jump("jumping_jacks_win"), SetVariable("jj", 0), SetVariable("cristina.jj", 0)]
Thanks in advance
 

TCMS

Quote my posts if you want an answer
Donor
Former Staff
Aug 5, 2016
5,797
30,913
Not a python expert in any way, but going by basic coding logic this could be done i'd reckon:
Code:
hbox:
        xalign 0.5
        yalign 0.54
        if jumping:
            imagebutton auto "/gui/jump_%s.png":
                xalign 0.5
                if b.race == 0:
                    action [Function(renpy.hide,"kid jumping sport"), Function(renpy.show,"tom jumping sport", at_list=[kid_jump]), SetVariable("jj", jj+ 1), SetVariable("b.stamina", b.stamina-1), Play("sfx3", "/sfx/click.mp3"), Play("sfx1", "/sfx/clap.mp3"), SetVariable("jumping", False)]

                if b.race == 1:
                    action [Function(renpy.hide,"kid jumping sport"), Function(renpy.show,"j3 jumping sport", at_list=[kid_jump]), SetVariable("jj", jj+ 1), SetVariable("b.stamina", b.stamina-1), Play("sfx3", "/sfx/click.mp3"), Play("sfx1", "/sfx/clap.mp3"), SetVariable("jumping", False)]

                if b.race == 2:
                    action [Function(renpy.hide,"kid jumping sport"), Function(renpy.show,"lee jumping sport", at_list=[kid_jump]), SetVariable("jj", jj+ 1), SetVariable("b.stamina", b.stamina-1), Play("sfx3", "/sfx/click.mp3"), Play("sfx1", "/sfx/clap.mp3"), SetVariable("jumping", False)]

                if b.race == 3:
                    action [Function(renpy.hide,"kid jumping sport"), Function(renpy.show,"ricardo jumping sport", at_list=[kid_jump]), SetVariable("jj", jj+ 1), SetVariable("b.stamina", b.stamina-1), Play("sfx3", "/sfx/click.mp3"), Play("sfx1", "/sfx/clap.mp3"), SetVariable("jumping", False)]

                if renpy.variant("touch"):
                    at customzoom
                else:
                    at customzoom2

        else:
            imagebutton idle "/gui/jump_disabled.png":
                xalign 0.5
                action NullAction()
                if renpy.variant("touch"):
                    at customzoom
                else:
                    at customzoom2
            timer 1.0 action SetVariable("jumping", True)

        if jj >= 50:
            timer 0.1 action [Hide("minigame_jumping_jacks", transition=dissolve), Jump("jumping_jacks_win"), SetVariable("jj", 0), SetVariable("cristina.jj", 0)]
Also I'd reckon the if b.race codes after the first could be elif. There's probably people with better solutions who are more familiar with python than me, but here's mine <.<
 
  • Like
Reactions: jon95

Porcus Dev

Engaged Member
Game Developer
Oct 12, 2017
2,582
4,705
Maybe like this:

Code:
if b.race == 0:
    $ raceimagename = "tom jumping sport"
if b.race == 1:
    $ raceimagename = "j3 jumping sport"
if b.race == 2:
    $ raceimagename = "lee jumping sport"
if b.race == 3:
    $ raceimagename = "ricardo jumping sport"

default customzoom_mode = "customzoom"
if renpy.variant("touch"):
     $ customzoom_mode = "customzoom2"

hbox:
        xalign 0.5
        yalign 0.54
        if jumping:
           imagebutton auto "/gui/jump_%s.png":
               xalign 0.5
               action Hide("kid jumping sport"),Show([raceimagename]), at_list=[kid_jump]), SetVariable("jj", jj+ 1), SetVariable("b.stamina", b.stamina-1), Play("sfx3", "/sfx/click.mp3"), Play("sfx1", "/sfx/clap.mp3"), SetVariable("jumping", False)]
               at [customzoom_mode]

        else:
            imagebutton idle "/gui/jump_disabled.png":
                xalign 0.5
                action NullAction()
                at [customzoom_mode]
            timer 1.0 action SetVariable("jumping", True)

        if jj >= 50:
            timer 0.1 action [Hide("minigame_jumping_jacks", transition=dissolve), Jump("jumping_jacks_win"), SetVariable("jj", 0), SetVariable("cristina.jj", 0)]
If the only thing that changes in your commands is what is shown, you can assign a variable and give it the value before executing the command, so the same command will serve for any of the values it has previously assigned.

Update: You can also use another code to make the command shorter. Instead of "[Function(renpy.hide, "kid jumping sport")" you can use "Hide("kid jumping sport")".

Update 2: As for "customzoom" or "customzoom2", you can also use a variable to specify the type of "at" you are going to use, so you only need three lines and you won't have to write the four check lines every time you need it.

(Note: it's an idea, I'm not completely sure and I haven't tried it :p)
 
Last edited:
  • Like
Reactions: TCMS

jon95

Member
Game Developer
Sep 29, 2018
176
393
Thanks to @TCMS and @mgomez0077 for your help but I have another question
Code:
menu:
        "so what":
            scene 240
            mc "It’s ok! I’m your father so it doesn’t matter."
            mc "And I have already seen your naked butt countless times when you were still small."
            scene 241
            sp "Stepfather, and that was many years ago. My butt is totally deferent now from that time."

            menu:
                "I don’t believe":
                    scene 240
                    mc "I don’t believe it! How much can it change in just a few years ?"
                    scene 241
                    sp "I don’t mind showing you."

                    menu:
                        "Really":
                            $ sp_ass = True

                            scene 240
                            mc "Really!? will you show me your ass?"
                            scene 241
                            sp "If it is [mc], then it’s ok."
                            sp "But you have to get out first so that I can change into a good dress."
                            scene 240
                            mc "Fine! I’ll wait for you to change. You should better not deceive me or I don’t mind punishing you developed
                            butt."

                        "No":
                            scene 240
                            mc "No, I don’t want to see my daughter's ass. I’ll wait for you outside."
                            mc "When you finish, call me."

                "You will always stay a child":
                    scene 240
                    mc "No matter how much you grew up, you will always stay a child in my eyes."
                    mc "I’ll wait for you outside when you finish call me."

        "Sorry":
            scene 240
            mc "Sorry, I didn’t know. I’ll get out now."
Is there a simple way to write this code too?
 

Porcus Dev

Engaged Member
Game Developer
Oct 12, 2017
2,582
4,705
Thanks to @TCMS and @mgomez0077 for your help but I have another question
Code:
menu:
        "so what":
            scene 240
            mc "It’s ok! I’m your father so it doesn’t matter."
            mc "And I have already seen your naked butt countless times when you were still small."
            scene 241
            sp "Stepfather, and that was many years ago. My butt is totally deferent now from that time."

            menu:
                "I don’t believe":
                    scene 240
                    mc "I don’t believe it! How much can it change in just a few years ?"
                    scene 241
                    sp "I don’t mind showing you."

                    menu:
                        "Really":
                            $ sp_ass = True

                            scene 240
                            mc "Really!? will you show me your ass?"
                            scene 241
                            sp "If it is [mc], then it’s ok."
                            sp "But you have to get out first so that I can change into a good dress."
                            scene 240
                            mc "Fine! I’ll wait for you to change. You should better not deceive me or I don’t mind punishing you developed
                            butt."

                        "No":
                            scene 240
                            mc "No, I don’t want to see my daughter's ass. I’ll wait for you outside."
                            mc "When you finish, call me."

                "You will always stay a child":
                    scene 240
                    mc "No matter how much you grew up, you will always stay a child in my eyes."
                    mc "I’ll wait for you outside when you finish call me."

        "Sorry":
            scene 240
            mc "Sorry, I didn’t know. I’ll get out now."
Is there a simple way to write this code too?
I don't see the way you want to improve :unsure:
They're lines of text and menus, it's the basics :p
 
  • Like
Reactions: jon95

TCMS

Quote my posts if you want an answer
Donor
Former Staff
Aug 5, 2016
5,797
30,913
I don't see any way since there's no logical statements just text, maybe mgomez knows o.0

Edit: Oops, he posted before me :D
 

Porcus Dev

Engaged Member
Game Developer
Oct 12, 2017
2,582
4,705
I don't see any way since there's no logical statements just text, maybe mgomez knows o.0

Edit: Oops, he posted before me :D
The only thing that is repeated are the images, maybe he wants to avoid that... and it could be done with variables, but it would be more complicated and the code would end up being longer, it's not worth it; and there's no problem repeating the images that way, it's the usual thing :D
 
  • Like
Reactions: jon95 and TCMS

the66

beware, the germans are cumming
Modder
Donor
Respected User
Jan 27, 2017
7,809
24,389
Maybe like this:

Code:
if b.race == 0:
    $ raceimagename = "tom jumping sport"
if b.race == 1:
    $ raceimagename = "j3 jumping sport"
if b.race == 2:
    $ raceimagename = "lee jumping sport"
if b.race == 3:
    $ raceimagename = "ricardo jumping sport"

default customzoom_mode = "customzoom"
if renpy.variant("touch"):
     $ customzoom_mode = "customzoom2"

hbox:
        xalign 0.5
        yalign 0.54
        if jumping:
           imagebutton auto "/gui/jump_%s.png":
               xalign 0.5
               action Hide("kid jumping sport"),Show([raceimagename]), at_list=[kid_jump]), SetVariable("jj", jj+ 1), SetVariable("b.stamina", b.stamina-1), Play("sfx3", "/sfx/click.mp3"), Play("sfx1", "/sfx/clap.mp3"), SetVariable("jumping", False)]
               at [customzoom_mode]

        else:
            imagebutton idle "/gui/jump_disabled.png":
                xalign 0.5
                action NullAction()
                at [customzoom_mode]
            timer 1.0 action SetVariable("jumping", True)

        if jj >= 50:
            timer 0.1 action [Hide("minigame_jumping_jacks", transition=dissolve), Jump("jumping_jacks_win"), SetVariable("jj", 0), SetVariable("cristina.jj", 0)]
If the only thing that changes in your commands is what is shown, you can assign a variable and give it the value before executing the command, so the same command will serve for any of the values it has previously assigned.

Update: You can also use another code to make the command shorter. Instead of "[Function(renpy.hide, "kid jumping sport")" you can use "Hide("kid jumping sport")".

Update 2: As for "customzoom" or "customzoom2", you can also use a variable to specify the type of "at" you are going to use, so you only need three lines and you won't have to write the four check lines every time you need it.

(Note: it's an idea, I'm not completely sure and I haven't tried it :p)
default customzoom_mode = "customzoom" and at [customzoom_mode] don't work this way. just assign the atl transformation object to a variable with $ customzoom_mode = customzoom. you even can provide arguments, if the transform requests them $ customzoom_mode = customzoom(arg1, arg2). in the displayable definition just use at customzoom_mode. the [] substitution is for strings. with at [customzoom_mode] you create a list with customzoom_mode as only element. same goes for Show([raceimagename]).

and for the original problem...
Code:
$ raceimagename = ["tom jumping sport", "j3 jumping sport", "lee jumping sport",
    "ricardo jumping sport", ]

hbox:
    xalign 0.5
    yalign 0.54
    if jumping:
        imagebutton auto "/gui/jump_%s.png":
            at (customzoom2 if renpy.variant("touch") else customzoom)
            xalign 0.5
            action [Hide("kid jumping sport"), Show(raceimagename[b.race]), at_list=[kid_jump]), SetVariable("jj", jj+ 1), SetVariable("b.stamina", b.stamina-1), Play("sfx3", "/sfx/click.mp3"), Play("sfx1", "/sfx/clap.mp3"), SetVariable("jumping", False)]
    else:
        imagebutton idle "/gui/jump_disabled.png":
            at (customzoom2 if renpy.variant("touch") else customzoom)
            xalign 0.5
            action NullAction()
        timer 1.0 action SetVariable("jumping", True)

    if jj >= 50:
        timer 0.1 action [Hide("minigame_jumping_jacks", transition=dissolve), Jump("jumping_jacks_win"), SetVariable("jj", 0), SetVariable("cristina.jj", 0)]
 
Last edited:
  • Like
Reactions: anne O'nymous

jon95

Member
Game Developer
Sep 29, 2018
176
393
Maybe like this:

Code:
if b.race == 0:
    $ raceimagename = "tom jumping sport"
if b.race == 1:
    $ raceimagename = "j3 jumping sport"
if b.race == 2:
    $ raceimagename = "lee jumping sport"
if b.race == 3:
    $ raceimagename = "ricardo jumping sport"

default customzoom_mode = "customzoom"
if renpy.variant("touch"):
     $ customzoom_mode = "customzoom2"

hbox:
        xalign 0.5
        yalign 0.54
        if jumping:
           imagebutton auto "/gui/jump_%s.png":
               xalign 0.5
               action Hide("kid jumping sport"),Show([raceimagename]), at_list=[kid_jump]), SetVariable("jj", jj+ 1), SetVariable("b.stamina", b.stamina-1), Play("sfx3", "/sfx/click.mp3"), Play("sfx1", "/sfx/clap.mp3"), SetVariable("jumping", False)]
               at [customzoom_mode]

        else:
            imagebutton idle "/gui/jump_disabled.png":
                xalign 0.5
                action NullAction()
                at [customzoom_mode]
            timer 1.0 action SetVariable("jumping", True)

        if jj >= 50:
            timer 0.1 action [Hide("minigame_jumping_jacks", transition=dissolve), Jump("jumping_jacks_win"), SetVariable("jj", 0), SetVariable("cristina.jj", 0)]
If the only thing that changes in your commands is what is shown, you can assign a variable and give it the value before executing the command, so the same command will serve for any of the values it has previously assigned.

Update: You can also use another code to make the command shorter. Instead of "[Function(renpy.hide, "kid jumping sport")" you can use "Hide("kid jumping sport")".

Update 2: As for "customzoom" or "customzoom2", you can also use a variable to specify the type of "at" you are going to use, so you only need three lines and you won't have to write the four check lines every time you need it.

(Note: it's an idea, I'm not completely sure and I haven't tried it :p)
When I played the game it broke down at this point
x.jpg
I tried @the66 solution
default customzoom_mode = "customzoom" and at [customzoom_mode] don't work this way. just assign the atl transformation object to a variable with $ customzoom_mode = customzoom. you even can provide arguments, if the transform requests them $ customzoom_mode = customzoom(arg1, arg2). in the displayable definition just use at customzoom_mode. the [] substitution is for strings. with at [customzoom_mode] you create a list with customzoom_mode as only element. same goes for Show([raceimagename]).

and for the original problem...
Code:
$ raceimagename = ["tom jumping sport", "j3 jumping sport", "lee jumping sport",
    "ricardo jumping sport", ]

hbox:
    xalign 0.5
    yalign 0.54
    if jumping:
        imagebutton auto "/gui/jump_%s.png":
            at (customzoom2 if renpy.variant("touch") else customzoom)
            xalign 0.5
            action [Hide("kid jumping sport"), Show(raceimagename[b.race]), at_list=[kid_jump]), SetVariable("jj", jj+ 1), SetVariable("b.stamina", b.stamina-1), Play("sfx3", "/sfx/click.mp3"), Play("sfx1", "/sfx/clap.mp3"), SetVariable("jumping", False)]
    else:
        imagebutton idle "/gui/jump_disabled.png":
            at (customzoom2 if renpy.variant("touch") else customzoom)
            xalign 0.5
            action NullAction()
        timer 1.0 action SetVariable("jumping", True)

    if jj >= 50:
        timer 0.1 action [Hide("minigame_jumping_jacks", transition=dissolve), Jump("jumping_jacks_win"), SetVariable("jj", 0), SetVariable("cristina.jj", 0)]
But the game didn't even work
You don't have permission to view the spoiler content. Log in or register now.
 

the66

beware, the germans are cumming
Modder
Donor
Respected User
Jan 27, 2017
7,809
24,389
When I played the game it broke down at this point
View attachment 343886
I tried @the66 solution

But the game didn't even work
You don't have permission to view the spoiler content. Log in or register now.
just make sure, that customzoom and customzoom2 in at (customzoom2 if renpy.variant("touch") else customzoom) are actually atl transform objects and no strings.
 
  • Like
Reactions: jon95

jon95

Member
Game Developer
Sep 29, 2018
176
393
just make sure, that customzoom and customzoom2 in at (customzoom2 if renpy.variant("touch") else customzoom) are actually atl transform objects and no strings.
like this?
Code:
transform customzoom:
    zoom 0.8

transform customzoom2:
    zoom 0.5
 

the66

beware, the germans are cumming
Modder
Donor
Respected User
Jan 27, 2017
7,809
24,389
like this?
Code:
transform customzoom:
    zoom 0.8

transform customzoom2:
    zoom 0.5
yup, customzoom and customzoom2 are atl transform objects. use them correctly like
Python:
add "some image":
    at customzoom
and not like
Python:
add "some image":
    at "customzoom"
 

jon95

Member
Game Developer
Sep 29, 2018
176
393
yup, customzoom and customzoom2 are atl transform objects. use them correctly like
Python:
add "some image":
    at customzoom
and not like
Python:
add "some image":
    at "customzoom"
the traceback say that there is problems with
Code:
 action [Hide("kid jumping sport"), Show(raceimagename[b.race]), at_list=[kid_jump]), SetVariable("jj", jj+ 1), SetVariable("b.stamina", b.stamina-1), Play("sfx3", "/sfx/click.mp3"), Play("sfx1", "/sfx/clap.mp3"), SetVariable("jumping", False)]
ps "tom jumping sport", "j3 jumping sport", "lee jumping sport", "ricardo jumping sport" are images also since they are in the same array how can I make it chose the right one
 

the66

beware, the germans are cumming
Modder
Donor
Respected User
Jan 27, 2017
7,809
24,389
ok, my bad. always thought these are screens :oops:. try
Python:
action [Function(renpy.hide ,"kid jumping sport"), Function(renpy.show, raceimagename[b.race]), at_list=[kid_jump]), SetVariable("jj", jj+ 1), SetVariable("b.stamina", b.stamina-1), Play("sfx3", "/sfx/click.mp3"), Play("sfx1", "/sfx/clap.mp3"), SetVariable("jumping", False)]
. you select the element of the list via b.race.
 

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Donor
Respected User
Jun 10, 2017
10,976
16,232
default customzoom_mode = "customzoom" and at [customzoom_mode] don't work this way. just assign the atl transformation object to a variable with $ customzoom_mode = customzoom.
Still it's better to do it by using the default screen statement like mgomez0077 did.
Code:
screen whatever:
     $ varName = something
will add varName in the default scope/store and include it in every save file. This while :
Code:
screen whatever:
     default varName = something
will add varName in the screen scope/store, and forget everything about it once the screen will be hidden. In the end the behavior is the same than variables defined with renpy.dynamic, they will be local to the actual screen.
In addition to this, default will be interpreted when the screen is predicted and displayed, but not when the screen is updated. Which prevent the value to be accidentally reset.

The only limitation here is if you use the use screen statement ; default isn't designed for this.
You don't have permission to view the spoiler content. Log in or register now.
 
  • Like
Reactions: jon95

the66

beware, the germans are cumming
Modder
Donor
Respected User
Jan 27, 2017
7,809
24,389
um, nope. a variable defined in a screen is only valid for this screen no matter what. it's not accessible from outside the screen even if said screen is displayed.
 

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Donor
Respected User
Jun 10, 2017
10,976
16,232
um, nope. a variable defined in a screen is only valid for this screen no matter what. it's not accessible from outside the screen even if said screen is displayed.
Oh... Well, I'll update my notes regarding compatibility ; I should have forgot to verify if it changed at some time.
 

the66

beware, the germans are cumming
Modder
Donor
Respected User
Jan 27, 2017
7,809
24,389
hmm, i don't think that there were any changes lately. for instance saving in a choice menu wouldn't be possible, if screenvariables would be accessable outside their scope. both involved standard Ren'Py screens use a variable named i, one as object for the menu choices the other as a simple iterator for save_load slots.
 

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Donor
Respected User
Jun 10, 2017
10,976
16,232
hmm, i don't think that there were any changes lately.
I don't necessarily talk about lately.
For to be effectively useful, my Variable Extended Viewer have to be able to works with as many version of Ren'py as possible. So, I started with what was the last version at this time, the 6.99.12.4. Then, once I had a working code, I tried it with previous versions, correcting the problems as I went, until it the correction implied too much works for the few possible games still available.
It sent me five years back in time and taught me a lot about Ren'py, but if I had to do it again now, I would probably do the opposite, starting with an old version. The number of time backward compatibility have been broke being very low compared to the time where something was added.
This said, perhaps that it's not exactly an effective change in the behavior, but that this part of the code was just broke at one time. I wasn't always rigorous with my notes because it was sometimes more depressive than anything else to do this monkey works.
 

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Donor
Respected User
Jun 10, 2017
10,976
16,232
Hello,
I want to know if there is a way to make this more simple?
Now that I had the time to took a look at the game, and so the context, the way to make this more simple is something totally different. And it will not only make this screen simpler, but the whole game.
You don't need ConditionSwitch for your images, because text interpolation works with the image statement. This mean that instead what you have actually, by example this :
Code:
image side kid surprised sport = ConditionSwitch(
    "b.race == 0", "/tom/tom surprised sport.png",
    "b.race == 1", "/j3/j3 surprised sport.png",
    "b.race == 2", "/lee/lee surprised sport.png",
    "b.race == 3", "/ricardo/ricardo surprised sport.png")
you can just write this :
Code:
image side kid surprised sport = "[b.race]/[b.race] surprised sport.png"
With b.race being either "tom", "j3", "lee" or "ricardo".

It will need a little more works since you'll have to define all MC's images, but in the end it will be less works than what you're actually facing. Oh, and it will also have to make the next version incompatible with actual save, but well it's already the case for this update.

So, reported to the specific question you asked here, firstly, remove "tom jumping sport", "j3 jumping sport", "ricardo jumping sport" and "lee jumping sport" definition, they are now useless. And the code become this :
Code:
image kid jumping sport = "[b.race]/[b.race] jumping sport.png"

image kid jumping anim:
    "[b.race]/[b.race] jumping01.png"
    0.2
    "[b.race]/[b.race] jumping02.png"
    0.1
    "[b.race]/[b.race] jumping03.png"
    0.1
    "[b.race]/[b.race] jumping04.png"
    0.1
    "[b.race]/[b.race] jumping05.png"
    0.2
    "[b.race]/[b.race] jumping04.png"
    0.1
    "[b.race]/[b.race] jumping03.png"
    0.1
    "[b.race]/[b.race] jumping01.png"

screen minigame_jumping_jacks:
    [...] 

    hbox:
        xalign 0.5
        yalign 0.54
        if jumping:
            imagebutton auto "/gui/jump_%s.png":
                xalign 0.5
                action [ Function(renpy.hide,"kid jumping sport"), Function(renpy.show,"kid jumping anim", at_list=[kid_jump]), SetVariable("jj", jj+ 1), SetVariable("b.stamina", b.stamina-1), Play("sfx3", "/sfx/click.mp3"), Play("sfx1", "/sfx/clap.mp3"), SetVariable("jumping", False)]
                at ( customzoom if renpy.variant("touch") else customzoom2 )
        else:
            imagebutton idle "/gui/jump_disabled.png":
                xalign 0.5
                action NullAction()
                at ( customzoom if renpy.variant("touch") else customzoom2 )
            timer 1.0 action SetVariable("jumping", True)

        if jj >= 50:
            timer 0.1 action [Hide("minigame_jumping_jacks", transition=dissolve), Jump("jumping_jacks_win"), SetVariable("jj", 0), SetVariable("cristina.jj", 0)]