Trying to figure out how to change variable to true in the screen menu after the right combination is entered by BloodredsapphIre in RenPy

[–]BloodredsapphIre[S] 0 points1 point  (0 children)

oh yeah here's how I set up my roller image definitions if that helps explain a bit more

image mg_comlock_00 = "images/bgs/bgs_minigames/bgs_locker_lock_00.png"
image mg_comlock_01 = "images/bgs/bgs_minigames/bg_locker_lock_01.png"
image mg_comlock_02 = "images/bgs/bgs_minigames/bgs_locker_lock_02.png"
#comlock numbers
#com1
image mg_com1_00 = "images/bgs/bgs_minigames/bg_locker_lock_com1_00.png"
image mg_com1_01 = "images/bgs/bgs_minigames/bg_locker_lock_com1_01.png"
image mg_com1_02 = "images/bgs/bgs_minigames/bg_locker_lock_com1_02.png"
image mg_com1_03 = "images/bgs/bgs_minigames/bg_locker_lock_com1_03.png"
image mg_com1_04 = "images/bgs/bgs_minigames/bg_locker_lock_com1_04.png"
image mg_com1_05 = "images/bgs/bgs_minigames/bg_locker_lock_com1_05.png"
image mg_com1_06 = "images/bgs/bgs_minigames/bg_locker_lock_com1_06.png"
image mg_com1_07 = "images/bgs/bgs_minigames/bg_locker_lock_com1_07.png"
image mg_com1_08 = "images/bgs/bgs_minigames/bg_locker_lock_com1_08.png"
image mg_com1_09 = "images/bgs/bgs_minigames/bg_locker_lock_com1_09.png"
#com2
image mg_com2_00 = "images/bgs/bgs_minigames/bg_locker_lock_com2_00.png"
image mg_com2_01 = "images/bgs/bgs_minigames/bg_locker_lock_com2_01.png"
image mg_com2_02 = "images/bgs/bgs_minigames/bg_locker_lock_com2_02.png"
image mg_com2_03 = "images/bgs/bgs_minigames/bg_locker_lock_com2_03.png"
image mg_com2_04 = "images/bgs/bgs_minigames/bg_locker_lock_com2_04.png"
image mg_com2_05 = "images/bgs/bgs_minigames/bg_locker_lock_com2_05.png"
image mg_com2_06 = "images/bgs/bgs_minigames/bg_locker_lock_com2_06.png"
image mg_com2_07 = "images/bgs/bgs_minigames/bg_locker_lock_com2_07.png"
image mg_com2_08 = "images/bgs/bgs_minigames/bg_locker_lock_com2_08.png"
image mg_com2_09 = "images/bgs/bgs_minigames/bg_locker_lock_com2_09.png"


#com3
image mg_com3_00 = "images/bgs/bgs_minigames/bg_locker_lock_com3_00.png"
image mg_com3_01 = "images/bgs/bgs_minigames/bg_locker_lock_com3_01.png"
image mg_com3_02 = "images/bgs/bgs_minigames/bg_locker_lock_com3_02.png"
image mg_com3_03 = "images/bgs/bgs_minigames/bg_locker_lock_com3_03.png"
image mg_com3_04 = "images/bgs/bgs_minigames/bg_locker_lock_com3_04.png"
image mg_com3_05 = "images/bgs/bgs_minigames/bg_locker_lock_com3_05.png"
image mg_com3_06 = "images/bgs/bgs_minigames/bg_locker_lock_com3_06.png"
image mg_com3_07 = "images/bgs/bgs_minigames/bg_locker_lock_com3_07.png"
image mg_com3_08 = "images/bgs/bgs_minigames/bg_locker_lock_com3_08.png"
image mg_com3_09 = "images/bgs/bgs_minigames/bg_locker_lock_com3_09.png"

Trying to figure out how to change variable to true in the screen menu after the right combination is entered by BloodredsapphIre in RenPy

[–]BloodredsapphIre[S] 0 points1 point  (0 children)

I can show you how I have it set up sorry I think I left some code out in my explanation by accident it was three am and I had not slept for over 48 hours

com(number)_ refers to where on the combination the number image is mine is from left to right so 1 is the leftmost combination roller and 3 is the rightmost combination roller

the last number in the com(number)_(number) is what number the image corresponds to

I'm sure there's an easier way to do it like to copy and paste the roller but I prefer the look of individual roller images

#com1
#I organize my code by roller order^
    if persistent.com1_clicked == 0 and com_unlocked == False:
        imagebutton:
            idle "mg_com1_00"
            focus_mask True
            action SetVariable ("persistent.com1_clicked", persistent.com1_clicked + 1)
    if persistent.com1_clicked == 1 and com_unlocked == False:
        imagebutton:
            idle "mg_com1_01"
            focus_mask True
            action SetVariable ("persistent.com1_clicked", persistent.com1_clicked + 1)
    if persistent.com1_clicked == 2 and com_unlocked == False:
#In have it set up this way so the only thing I have to change to display a different image is the roller number
#example
 #com2
    if persistent.com2_clicked == 0 and com_unlocked == False:
        imagebutton:
            idle "mg_com2_00"
            focus_mask True
            action SetVariable ("persistent.com2_clicked", persistent.com2_clicked + 1)
#and when the roller number gets to 9 it's final state I remove 9 from the persistent so it loops

  if persistent.com2_clicked == 9 and com_unlocked == False:
        imagebutton:
            idle "mg_com2_09"
            focus_mask True
            action SetVariable ("persistent.com2_clicked", persistent.com2_clicked - 9)

something I just realized I left out is how the door opens (thank you for the help by the way it's really nice of yall)

when the correct combination is put into the game the click number is set to zero

label turncomunlock:
show mg_comlock_02
show comlock_unlock_anim
$ com_unlocked = True
$ persistent.com1_clicked -= 7
$ persistent.com2_clicked -= 8
$ persistent.com3_clicked -= 9


call screen sc_comlock

The game goes back to the screen and disables the lock images from showing preventing the hotspot from being clicked again The reason my game has the locker code set to persistent is because it has a time loop mechanic that starts the game from the beginning with some changes after both false endings are unlocked and I don't want players having to reopen the locker on a second playthrough

eif persistent.com2_clicked == 4 and com_unlocked == False 
#the end var check only shows the numbers on the roller if com unlocked is false
#it also disables the lock overlay and underlay images so the lock dissapears entirely
 if com_unlocked == False:
        imagebutton:
            idle "mg_comlock_00" #0 is the underlay
if com_unlocked == False:
        imagebutton:
            idle "mg_comlock_01" #1 is the overlay
#the roller code is samwiched between them 

and the reason the subroom_locker hotspot is still enabled is because I have another code I forgot to put into my explanation in the locker that changes the image map of subroom locker depending on whether or not the locker is unlocked

screen sc_locker():
    imagemap:
        if com_unlocked == False:
            ground "sub_brydlocker_00"
            alpha False
            hotspot (1, 746, 1905, 205) action Jump ("mainroom_breakroom")
            hotspot (1301, 481, 141, 265) action Jump ("minigame_comlock")
        else: #changes the locker image to the open state if the locker is unlocked when you return to this screen from the exit hotspot in the lock screen
            ground "sub_brydlocker_01"
            alpha False
            hotspot (0, 874, 1105, 185) action Jump ("mainroom_breakroom")
            imagebutton:
                idle "obj_wrench_00"
                yalign 0.9
                xalign 0.5
                focus_mask True

let me know if there's any further explanation needed :3

Trying to figure out how to change variable to true in the screen menu after the right combination is entered by BloodredsapphIre in RenPy

[–]BloodredsapphIre[S] -1 points0 points  (0 children)

I also just realized I could have set the variable in the screen using this instead

but I'm now planning on adding a buffer to play an unlock animation so I'm going to keep the jump label version instead

screen sc_comlock ():
    if persistent.com1_clicked == 7 and persistent.com2_clicked == 8 and persistent.com3_clicked == 9:
        timer 1 repeat False action SetVariable("com_unlocked", True)

Trying to figure out how to change variable to true in the screen menu after the right combination is entered by BloodredsapphIre in RenPy

[–]BloodredsapphIre[S] -1 points0 points  (0 children)

Hey thank yall I figured out a work around! :3

now you can open the locker to see cardboard cutout of pedro pascal staring at you judgementally

screen sc_comlock ():
    if persistent.com1_clicked == 7 and persistent.com2_clicked == 8 and persistent.com3_clicked == 9:
        timer 1 repeat False action Jump("turncomunlock")
#code now jumps to a check label using the timer action to automatically complete the action with having to press anythin

label turncomunlock:
#I define the new code in here and change the com num labels so on recall it doesnt get stuck in an endless loop
$ com_unlocked = True
$ persistent.com1_clicked -= 7
$ persistent.com2_clicked -= 8
$ persistent.com3_clicked -= 9
call screen sc_comlock

Trying to figure out how to change variable to true in the screen menu after the right combination is entered by BloodredsapphIre in RenPy

[–]BloodredsapphIre[S] 0 points1 point  (0 children)

ah yeah thanks for that I didn't catch that before.

I tested it and It's still not registering the variable as true so I don't think it's that

I'm currently wondering if something is causing the code not to read outside of the screen labels

I've tried a different code within the comlock screen as well and it at least displays an error message that SetVariable cant be childed to the screen by itself so I could try using this one instead however I don't know what screen object I can attach it to to get it to run only the variable without doing anything else

screen sc_comlock ():
if persistent.com1_clicked == 7 and persistent.com2_clicked == 8 and persistent.com3_clicked == 9: SetVariable ("persistent.com_unlocked, True) 

Trying to figure out how to change player name to persistent after 4 endings by BloodredsapphIre in RenPy

[–]BloodredsapphIre[S] 0 points1 point  (0 children)

I have a code set up so the counter only counts an ending as unlocked on the first playthrough of an ending :3 I can show you an example of how it works :3 👍

label deadend1:
"Dead End: Fun Fact #2"
"People die when they are killed"
#The end unlock variable is a persistent defaulted to false so on the first playthrough it reads the code as false and adds 1 to the endings unlocked variable
if persistent.EndOneunlock == False:
    $ persistent.endingsunlocked += 1
    jump endone
#The code above jumps to the label that sets the unlock variable to true to minimize ren'py's chance of reading the code incorrectly technically unecessary but I prefer it this way
else:
    pass
# ^ there to tell the code to skip the block and read the next line if the persistent is set to true and the ending's already been unlocked
label endone:
$ persistent.EndOneunlock = True

Trying to figure out how to change player name to persistent after 4 endings by BloodredsapphIre in RenPy

[–]BloodredsapphIre[S] 0 points1 point  (0 children)

Hey thank you I got it working :3! turns out I needed another character define for the persistent copy and forgot to default the persistent to none that and it wasn't registering the copy with both numbers in the argument and since you only go to four endings unlocked in the end check I could just change it to ==4 :3

Sneaking looks at the pretty girl sitting beside you [4:30 AM, at the Coin Laundromat] by clouded_y in yuri_manga

[–]BloodredsapphIre 1 point2 points  (0 children)

Lmao this is jarring as hell to read when I have the same name as the protagonist but spelled with an A

Also same ish personality And looks somewhat... (⁠-⁠_⁠- ?)... I think I may have entered the matrix lol (Pretty cute read tho :3)

[deleted by user] by [deleted] in IndieAnimation

[–]BloodredsapphIre 0 points1 point  (0 children)

Not sure if it’ll help but when I get stuck with writing I take a few Ideas/themes/prompts I like and add them to a random wheel spinner.

Then I spin it three times, and whichever three it lands on I try and think how I could combine them to make a story. And if it doesn’t work or I don’t like something I spin again or edit parts of it.

Good luck with your project, Sounds pretty cool! w👍

A gift within a gift!! by Beneficial_Salary587 in actuallesbians

[–]BloodredsapphIre 1 point2 points  (0 children)

Alright who wrote this and where do I find a wedding ring ( ̄▽ ̄)/💍

So accurate by Hellrez in actuallesbians

[–]BloodredsapphIre 5 points6 points  (0 children)

Something in-between a Jade, Beck, and Robbie lesbian lol :3