Hi Striver, I know this is a newbie question. Anyway, how to check if file exist for loadimage? I thought using null would work.
I'm trying to give naked picture for sexscene. What I want is, if image exist in naked folder, load them (success); if not, load the image in bodies folder (blank, it still trying to load the image from naked folder).
Here's my modified script in newsexsystem.gd
func showbody(i):
if globals.loadimage(i.person.imagefull.replace('bodies', 'naked')) != null:
$Panel/bodyimage.visible = true
$Panel/bodyimage.texture = globals.loadimage(i.person.imagefull.replace('bodies', 'naked'))
print(i.person.imagefull.replace('bodies', 'naked'))
elif globals.loadimage(i.person.imagefull) != null:
$Panel/bodyimage.visible = true
$Panel/bodyimage.texture = globals.loadimage(i.person.imagefull)
print(i.person.imagefull)
elif nakedspritesdict.has(i.person.unique):
...