Out of Curiosity... If/Elif/Else


#1

Is it possible to have an OR statement between flags? As in, if (flag) OR (flag)? I tried this but it gave me error messages and forced me to separate the flags even though I wanted the same dialogue for both. Is it possible to put them on the same line and if so how can I fix it?


#2

You would just do this

if (flag1) {

[dialogue for both flag1 and flag2]

} elif (flag2) {

[dialogue for both flag1 and flag2]

} else {
}


#3

I think she meant that first case happens if you have flag1 or flag2.


#4

I understand that, you would have to do the above. There is no “if (flag1 OR flag2)” so you would have to put the same dialogue in for each flag.


#5

Or you can basically do:

if (flag3) {

} else {
[dialogue for either flag1 and flag2]
}


#6