Ren'Py masturbating animation the variable not changing

rayminator

Engaged Member
Respected User
Sep 26, 2018
3,040
3,115
i am making a animation scene that you need to use the up and down keys

outhouse_ryan_handjob_M0.png outhouse_ryan_handjob_M10.png


what I have tried so far is using

if statement with >=, <= , >, < and I also tried to use a label and calling the screen I also tried using a python block it didn't change
I have also tried to put it into the key action by using setvariable but it continue to rise it up I only need it go up when it hits 10 and 0

Python:
  if masturbation_move >= 0 and masturbation_move <= 10:

        $ ryan_lust += 1
I have tried everything that I know of and look at my old posts that I needed help before but it didn't help there is something that I'm missing
everything is working fine but ryan_lust is not changing when I hit 0 or 10 I go it to work in rpg maker mz

here screen for it the screen masturbating_button and masturbate

Python:
screen masturbating_button:

    imagebutton:
        xalign 1.0
        yalign 1.0
        if ryan_lust >= 90:
            idle "mas_icon"
            hover "mas_icon"
            action Show("masturbate")
        else:
            idle "button_jerk_off.png"
            hover "button_jerk_off.png"
            action None
    text "[ryan_lust]" xpos 1830 ypos 1017

image mas_icon:
    "button_jerk_off.png"
    pause 0.2
    "button_jerk_off2.png"
    pause 0.2
    repeat


screen masturbate():

    if masturbation_move < 10:
        key 'repeat_K_UP':
            action SetVariable('masturbation_move', masturbation_move + 1)

    if masturbation_move > 0:
        key 'repeat_K_DOWN':
            action SetVariable('masturbation_move', masturbation_move - 1)

    add "outhouse_ryan_handjob_M0.png"
    if masturbation_move == 0:
        add "outhouse_ryan_handjob_M0.png"
    if masturbation_move == 1:
        add "outhouse_ryan_handjob_M1.png"
    if masturbation_move == 2:
        add "outhouse_ryan_handjob_M2.png"
    if masturbation_move == 3:
        add "outhouse_ryan_handjob_M3.png"
    if masturbation_move == 4:
        add "outhouse_ryan_handjob_M4.png"
    if masturbation_move == 5:
        add "outhouse_ryan_handjob_M5.png"
    if masturbation_move == 6:
        add "outhouse_ryan_handjob_M6.png"
    if masturbation_move == 7:
        add "outhouse_ryan_handjob_M7.png"
    if masturbation_move == 8:
        add "outhouse_ryan_handjob_M8.png"
    if masturbation_move == 9:
        add "outhouse_ryan_handjob_M9.png"
    if masturbation_move == 10:
        add "outhouse_ryan_handjob_M10.png"



    if masturbation_move >= 0 and masturbation_move <= 10:
        $ ryan_lust += 1
 

Alcahest

Engaged Member
Donor
Game Developer
Jul 28, 2017
3,118
4,019
i am making a animation scene that you need to use the up and down keys

View attachment 2241329 View attachment 2241330


what I have tried so far is using

if statement with >=, <= , >, < and I also tried to use a label and calling the screen I also tried using a python block it didn't change
I have also tried to put it into the key action by using setvariable but it continue to rise it up I only need it go up when it hits 10 and 0

Python:
  if masturbation_move >= 0 and masturbation_move <= 10:

        $ ryan_lust += 1
I have tried everything that I know of and look at my old posts that I needed help before but it didn't help there is something that I'm missing
everything is working fine but ryan_lust is not changing when I hit 0 or 10 I go it to work in rpg maker mz

here screen for it the screen masturbating_button and masturbate

Python:
screen masturbating_button:

    imagebutton:
        xalign 1.0
        yalign 1.0
        if ryan_lust >= 90:
            idle "mas_icon"
            hover "mas_icon"
            action Show("masturbate")
        else:
            idle "button_jerk_off.png"
            hover "button_jerk_off.png"
            action None
    text "[ryan_lust]" xpos 1830 ypos 1017

image mas_icon:
    "button_jerk_off.png"
    pause 0.2
    "button_jerk_off2.png"
    pause 0.2
    repeat


screen masturbate():

    if masturbation_move < 10:
        key 'repeat_K_UP':
            action SetVariable('masturbation_move', masturbation_move + 1)

    if masturbation_move > 0:
        key 'repeat_K_DOWN':
            action SetVariable('masturbation_move', masturbation_move - 1)

    add "outhouse_ryan_handjob_M0.png"
    if masturbation_move == 0:
        add "outhouse_ryan_handjob_M0.png"
    if masturbation_move == 1:
        add "outhouse_ryan_handjob_M1.png"
    if masturbation_move == 2:
        add "outhouse_ryan_handjob_M2.png"
    if masturbation_move == 3:
        add "outhouse_ryan_handjob_M3.png"
    if masturbation_move == 4:
        add "outhouse_ryan_handjob_M4.png"
    if masturbation_move == 5:
        add "outhouse_ryan_handjob_M5.png"
    if masturbation_move == 6:
        add "outhouse_ryan_handjob_M6.png"
    if masturbation_move == 7:
        add "outhouse_ryan_handjob_M7.png"
    if masturbation_move == 8:
        add "outhouse_ryan_handjob_M8.png"
    if masturbation_move == 9:
        add "outhouse_ryan_handjob_M9.png"
    if masturbation_move == 10:
        add "outhouse_ryan_handjob_M10.png"



    if masturbation_move >= 0 and masturbation_move <= 10:
        $ ryan_lust += 1
If I understand you correctly, you want ryan_lust to increase only when masturbation_move is 0 or 10.
Python:
   if masturbation_move == 0 or masturbation_move == 10:
        $ ryan_lust += 1
 

rayminator

Engaged Member
Respected User
Sep 26, 2018
3,040
3,115
okay I found out how to do it

Python:
screen masturbate():

    if masturbation_move < 10:
        key 'repeat_K_UP':
            action SetVariable('masturbation_move', masturbation_move + 1)
        key 'K_UP':
            action SetVariable('ryan_lust', ryan_lust + 1)
    if masturbation_move > 0:
        key 'repeat_K_DOWN':
            action SetVariable('masturbation_move', masturbation_move - 1)
        key 'K_DOWN':
            action SetVariable('ryan_lust', ryan_lust + 1)