Conditional

« Back to Glossary Index

Code that tells the computer to do something based on the outcome of evaluating a particular expression.

Conditional statements typically come in one of several forms:

if <expression>:
    <result>
if <expression>:
    <result>
elif <expression>:
    <result>
# can add more elif clauses
if <expression>:
    <result>
else:
    <result>
if <expression>:
    <result>
elif <expression>:
    <result>
# Can add more elif clauses
else:
    <result>

For a more detailed summary, check out Conditional Statements in Ren’Py.

Synonyms:
conditional statement
« Back to Glossary Index