Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
-
johandark
- Veteran
- Posts: 346
- Joined: Sat Apr 30, 2016 11:04 am
- Completed: Wild Guards, In Dreams
- Projects: Pact with a witch
- Deviantart: johandarkweb
- Location: Barcelona
-
Contact:
#1
Post
by johandark » Wed Aug 24, 2016 6:47 am
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?
-
Iylae
- Regular
- Posts: 73
- Joined: Sat Jan 09, 2016 6:57 am
- Location: Cornwall, UK
-
Contact:
#2
Post
by Iylae » Wed Aug 24, 2016 8:24 am
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
If we are what we repeatedly do, then good coding is not an act, but a habit
-
papiersam
- Veteran
- Posts: 231
- Joined: Fri Aug 12, 2016 2:24 pm
- Completed: Gem Hunt Beta, 1/Probably, Animunch
- Projects: The Panda Who Dreamed
-
Contact:
#3
Post
by papiersam » Wed Aug 24, 2016 10:09 am
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.
Users browsing this forum: Bing [Bot], Google [Bot]