I didn't know true/false has to be capitolized with the text processor commands, as in the normal coding you don't need to capitolize true/false.
-------
also, with booleans, you can shorten it when its the 'true' expression (and also the 'false' expression if you use the 'not' logic operator), I'll explain below.
if (orc.dead = true) { msg ("The orc is dead") }
if (orc.dead = false) { msg ("The orc is alive") }
if (not orc.dead = true) { msg ("The orc is alive") }
if (orc.dead <> true) { msg ("The orc is alive") }
if (not orc.dead = false) { msg ("The orc is dead") }
if (orc.dead <> false) { msg ("The orc is dead") }
when I started learning to code (not actual coding/programming learning which I'm doing now) with quest long ago (~3 yrs ago), I liked having:
if (orc.dead = true)
as this is how I understood booleans, in terms of string matching, see below:
orc.dead = true
if (orc.dead = true)
if (true = true) -> TRUE (t-r-u-e = t-r-u-e) -> msg ("Indeed, the orc is dead")
orc.dead = false
if (orc.dead = true)
if (false = true) -> FALSE (f-a-l-s-e =/= t-r-u-e) -> msg ("um no, the orc is still quite alive")
example of this same "string matching" concept with non-booleans (strings):
color = "red"
if (color = "red")
if ("red" = "red") -> TRUE (r-e-d = r-e-d)
if (color = "blue")
if ("red" = "blue") -> FALSE (r-e-d =/= b-l-u-e)
color = "blue"
if (color = "red")
if ("blue" = "red") -> FALSE (b-l-u-e =/= r-e-d)
if (color = "blue")
if ("blue" = "blue") -> TRUE (b-l-u-e = b-l-u-e)
for strings, you obviously have to have the '=blah', but you shouldn't have the '=true/false' with booleans, as I explain below (which I now understand well, as I'm learning to actually program, be a programmer, though when I started I didn't really understand why all the programmers hated my use of the '=true/false' with booleans)
however, those who knew programming, hated me doing this, as to them (and indeed it is) it is redundant in terms of how the programming works and thus is also an extra unneeding programming operation.
so, it can be shortened to this:
if (orc.dead) // if (true), do ...
and
if (not orc.dead) // if (not true) // if (false), do ...
as you don't need the: '= true', and nor the '=false' if you use the 'not' in front of it
but for me, at least during this early time of before I started to learn programming, it really helped me to understand booleans, by having that '=true/false' unneeded part, despite the cringing of all the programmers here, as it helped make sense to me, and thus when I tred to help and explain booleans to others, I used that '=true/false' as I figured if it helped me to understand booleans, it'd help them too. Though in terms of actual programming, this wasn't a good thing to be teaching them, which is why the programmers hated me doing it and kept correcting me with it.