Hey all. New to CS, trying to nail down a few particulars.
I apologize if someone has asked this question already, but I haven’t seen it, so I figured I’d throw this out there.
So, I’ve been toying with a way to give a protagonist a bit of a determinate personality, in a fashion that hopefully doesn’t jar the player too much. The way I’d like to do this is by tracking some choices at the beginning of the game, looking at how many instances of, say, diplomatic or kind responses they chose vs. how many sarcastic or humorous ones, etc. I was planning on using hidden variables to track this (i.e., ones not visible on the stats page), and then at the end of the first chapter, asking the game to spit out a boolean based on the numbers.
So, if the player chose humorous responses most often of the three options, the game would “*set funny true” or something, and keep the other two false, and then at certain dialogue/thought parts of the game, I could make some changes based on which of the variables was true. Of course, the player still can override this “default” personality in their actual choices, but I’d like the dialogue they don’t directly select to be something other than bland or neutral.
So… is there a way to get CS to compare three variables, then set a boolean based on which is highest? Maybe something like
*if ((funny > kind) and (funny > mean))
(indent)*set funny true
Can I use a construction like (funny > kind), assuming both have tracked numeric values? Is there some other way to do this that I’m not seeing? I’ve read through the basic CS guide, though I might have missed something like this.