m_from_space wrote: ↑Tue Aug 29, 2023 9:25 am
I don't know what your code is about, so here is what comes to mind:
Do your filenames include brackets like you have inside the string? Don't do that! Or are "nsfw" and "sfw" some kind of variables you like to include there?
Code: Select all
label nsfw_scene:
if persistent.nsfw_enabled:
show expression "images/nsfw/bg3v3_nsfw.png"
else:
show expression "images/sfw/bg3v3_sfw.png"
For the changes of a button to apply, the label would have to be called again of course. I mean that's obvious, I am just saying. Not sure what you mean by "but the images never change".
The images include "nsfw" and "sfw" in their file names (without brackets) but I was suggested to use the brackets. I obviously don't think they work but nsfw and sfw are supposed to be variables. I put the two images in separate folders labeled "nsfw" and "sfw", which I was also told was okay to do. Do I remove nsfw and sfw from the ends of the images and leave both as "bg3v3" in the two folders?
I toggle "nsfw" off in the game's settings and it never changes to the sfw version, which is why I'm posting. Do you need the other part of the code? Again, I was told the other code was good, but just if you want to look at it.
Edit: I think I figured something out but I'm not too sure what else to do.
So if I put this right before the image:
Code: Select all
label nsfw_scene:
if persistent.nsfw_enabled:
show expression "images/nsfw/bg3v3"
else:
show expression "images/sfw/bg3v3"
Then it will say either the nsfw image or sfw image isn't found, depending on if nsfw is off or on.
I'm looking into why that is right now.
Edit 2: I HAVE FIGURED IT OUT, THANK YOU FOR POINTING OUT THE BRACKETS! I just had to put .png after the image names and it works!