Page 1 of 1
Show an image If a boolean is False.
Posted: Wed Aug 24, 2016 6:47 am
by johandark
Code: Select all
show afternoon01_Bathroom DidacBeated with dissolve (if $ afternoon01_NotPunchDidac == False):
I want to show an image with dissolve if a "Boolean" called "afternoon01_NotPunchDidac" i esqual False...
This sentence give me an error... Wich is the correct way to do it?
Re: Show an image If a boolean is False.
Posted: Wed Aug 24, 2016 8:24 am
by Iylae
Not entirely sure whether you want to show the image but not with dissolve if the variable is set to true so... if you want only the dissolve part to be controlled by the variable:
Code: Select all
if afternoon01_NotPunchDidac: # (is equal to True)
show afternoon01_Bathroom DidacBeated
else: # (is not equal to True)
show afternoon01_Bathroom DidacBeated with dissolve
If you don't want to show anything if it's true:
Code: Select all
if (afternoon01_NotPunchDidac == False):
show afternoon01_Bathroom DidacBeated with dissolve
Re: Show an image If a boolean is False.
Posted: Wed Aug 24, 2016 10:09 am
by papiersam
Or, you could use:
Code: Select all
if not afternoon01_NotPunchDidac:
show afternoon01_Bathroom DidacBeated with dissolve
I've always preferred to use logical connectives when I could. It works with integers as well as boolean.