Code: Select all
default reject = False
transform giftGiven:
xalign .30 yalign .45
on hide:
linear 0.5 xoffset (-200 if reject else 200) alpha 0.0 #got the "else" from the Renpy subreddit, which often gives inaccurate code
#...
show gift at giftGiven
$reject = True
hide gift
Instead, when hidden, the "gift" image moves off to the right (xoffset 200). I assume this is because when I first showed the image, the variable "reject" was False. But I want the "on hide" animation to change appropriately when the variable has changed-- which it currently isn't doing.
I've tried putting conditional lines in the transform:
Code: Select all
transform giftGiven:
xalign .30 yalign .45
if reject == True:
linear 0.5 offset -200
elif reject == False:
linear 0.5 offset 200
I've tried writing a function statement, but I can't make sense of the documentation.
My brain is fried. Please send help.