HK Note:
still a work in progress, need to finish it up first, and then go back and format~organize~section it nicely, for it being easier to read by people
(I'm trying to: ~ "if you're going to do~teach this, then do~teach it right", as Pixie made me aware of, so that, is what I'm now trying to do, to the best of my ability and current, hopefully at least somewhat correct, knowledge~understanding of things)
------------------------------------
first, some background Programming~Computer~Physics~Electronics information:
(as best as I currently understand it, lol)
Computers use electricty, and they have circuitry 'switches' which are lit 'on' or 'off' (via high/low voltages and~or +/- charged currents ~ I'm still a bit confused in regards to the electrical-electronic physics of it). Somehow (this is still a total mystery to me~magical), this 'physical layer' is converted (and also vice-versa) into the binary (zeros and ones) 'logical layer', and thus is called 'machine language' (this is the lowest of the low level, aka computer-friendly, of programming languages). All code, all programming, must be converted into machine language, into binary (zeroes and ones) for the computer ~ CPU ~ processor. Luckily, this is done for us, and we only have to learn the high level (human-friendly) programming languages like C++, Java, Python, HTML, JS, Ruby, Basic, MS-DoS and various modern 'Shell' languages, AppleScript, C#, etc etc etc, and~or similar but unique game engine languages like Quest's code language.
just for (pretend) example only (I hope to eventually learn into the low level languages, learning assembly language and maybe even a bit of machine language):
quest's high level language <-----> machine language (lowest low level language)
msg ("hi, my name is HK") <------> 010111000110000011000010001101110001001
machine language wiki link:
https://en.wikipedia.org/wiki/Machine_c ... 0Q9QEIGTAASo, why the information above, for the topic of the 'if' block?
because, this is actually how conditionals and booleans work
a boolean's 'true' and 'false' values are human-friendly, but underneath the user level, 'true' is converted into '1' (technically it's any number except 0, but 1 is the convention used and to keep this simple too for people) and 'false' is converted into '0', this is binary.
so, for example, in concept (not sure if this actually works in quest):
'if (true)' is the same as 'if (1)'
'if (false)' is the same as 'if (0)'
and let's expand the concept a bit further:
(I'm still a bit confused on 'if (FALSE)' concept, as 'unary' or non-comparison conditionals are confusing for me, so if any of this confuses you, ignore it)
(comparison conditionals make much more sense to me: if (true = true), if (false = false), if (true = false), if (false = true), lol)
if (player.strength = 100)
// let's say: player.strength = 100
// if (100 = 100) -> TRUE: the scripts will be run
// if (TRUE == 100 = 100) -> TRUE: the scripts will be run
// if (TRUE)
// if (1)
if (player.strength = 100)
// let's say: player.strength = 0
// if (0 = 100) -> FALSE: the scripts will NOT be run
// if (TRUE =/= 0 = 100) -> FALSE: the scripts will NOT be run
// if (FALSE)
// if (0)
if (not player.strength = 100)
// let's say: player.strength = 0
// if (0 =/= 100) -> TRUE: the scripts will be run
// if (TRUE == 0 =/= 100) -> TRUE: the scripts will be run
// if (TRUE)
// if (1)
if (not player.strength = 100)
// let's say: player.strength = 100
// if (100 =/= 100) -> FALSE: the scripts will NOT be run
// if (TRUE =/= 100 == 100) -> FALSE: the scripts will NOT be run
// if (FALSE)
// if (0)
and now, we can finally address the 'if' block:
(I'll get to this, but not now, I'm tired)