- Sep 13, 2017
- 80
- 722
So I am making a replay/gallery function for my game. I've spent more than 6 hours on this small issue and finally had to cave in and ask for help.
I want the player to be able to toggle between scat and bestiality on and off before selecting a scene in the replay screen.
I managed to get bestiality toggle-able perfectly with this:
The scat portion does not work, and I know why. When Replay() kicks in, the default values are being used. In my case, scat is being controlled by a value (1 or 0, should have used True/False, sigh ), that is declared before my start label as scat = 0. Bestiality is being controlled by the patch and it works great for once.
I need to either toggle the default value to 1 somehow in my gallery screen, or I need to change persistent value to 1. I've tried so many things but keep getting errors.
I've tried defining scat like this
and then
And many other combinations, pretty much always ending up in some syntax errors or crashes.
Is there anyone who could help me figure out how to make scat toggled just like bestiality up above?
Also, if someone has an easy fix to make the player name transferable to the replays, that would be great too... That's next on my list and will probably also take another 6 hours...
I am extremely bad at coding... Thank you for your time . You guys are awesome
I want the player to be able to toggle between scat and bestiality on and off before selecting a scene in the replay screen.
I managed to get bestiality toggle-able perfectly with this:
Python:
init python:
gallery = Gallery()
gallery.button("black")
gallery.image("black")
screen gal:
tag menu
textbutton _("Scat On") action ToggleVariable("scat", true_value=1, false_value=0):
pos (700, 10)
textbutton _("Scat Off") action ToggleVariable("scat", true_value=0, false_value=1):
pos (700, 55)
if persistent.patch_installed:
textbutton _("Bestiality On") action [SetField(persistent, "patch_enabled", True), SelectedIf(persistent.patch_enabled)]:
pos (960,10)
textbutton _("Bestiality Off") action [SetField(persistent, "patch_enabled", False), SelectedIf(not persistent.patch_enabled)]:
pos (960,55)
vbox pos (153, 220):
imagebutton:
action Replay("alleyintro")
idle Transform("alley/alley026.jpg", zoom=0.175)
hover Transform("alley/alley026.jpg", zoom=0.2)
I need to either toggle the default value to 1 somehow in my gallery screen, or I need to change persistent value to 1. I've tried so many things but keep getting errors.
I've tried defining scat like this
Python:
init python:
gallery = Gallery()
gallery.button("black")
gallery.image("black")
if persistent.scat is None:
persistent.scat = 0
Python:
screen gal:
tag menu
textbutton _("Scat On") action ToggleField(persistent, 'scat', 1, 0):
pos (1200,10)
Is there anyone who could help me figure out how to make scat toggled just like bestiality up above?
Also, if someone has an easy fix to make the player name transferable to the replays, that would be great too... That's next on my list and will probably also take another 6 hours...
I am extremely bad at coding... Thank you for your time . You guys are awesome