I've gotten to the part of the game where I use the code, and it's working wonderfully!
I modified it a tiny bit so that I could have more quizzes leading to different sub-branches of the story, and so far it's working, but my code-writing skills are to programming pretty much what a monkey throwing fruit in the direction of a target is to marksmanship, so I wanted to make sure the little chunk of code I came up with won't cause chaos later down the road. ^^;;
I kept it the original way, just changing it from quiz to quiz1, and then changing the ending like this:
# Check the quiz score
if quiz1_score == 3:
b "Go on. Off you go."
l "Oh, thank you. Thank you very much."
# Did he win? Yes.
$ quiz1_win = True
$ quiz1_lose = False
# Did he win? No.
$ quiz1_win = False
$ quiz1_lose = True
But I'm not sure if I should have the two things (quiz1_win and quiz1_lose) in each for win and lose. Is it the right way to do it so that I can use a "quiz1_win = True" or False, and so on later? Or should I not have win and lose but just use "quiz1_win" true or false? Would it change anything?
I wanted to check with you, because sometimes things seem logical for someone who doesn't speaks the language well, and it turns out they're not logical at all... and since programming is very much like a language, I wasn't sure if I'd done it right. ^^;
And right about now I'm getting the feeling that what I added was dumb and that all I needed was to use win = true or false instead of adding the lose option. XD;;; I'm not sure. ^^;
After this part, the characters talk and all sorts of things happen, and later down the road this comes up:
Which is working so far, so I'm guessing it's okay to keep it this way, or is there a better way to put it? (In case this way might cause any problems.)
This is just my basic thing for now as I progress little bit by little bit. Once I add the extra subplots and things, I'd like to be able to not do just a jump from two options like that, but also to use the results of the previous quizzes to affect the things characters say and do, the way it was with the example in The_Question about "$ bl_game = True" being called later on with "if bl_game:" to change what the guy is talking about.
I'm trying to make them have a conversation in which the results of the quizzes come up, and then have a new option pop up based on that.
I wrote a code thingie for it, but it's not working, so I was wondering if what I'm doing is a total misuse of the menu, or if I just made a mistake somewhere that can be fixed? ^^;
k "talk talk talk"
k "I always knew you never truly cared for so-and-so (or whatever like that XD)."
z "You bet I don't!"
k "I always knew you cared for so-and-so (or whatever like that XD)."
z "I... I tried to hide something from you..."
k "You did...?"
"Yeah, you're actually the one I love!!"
"Yeah, I hid that I actually hate you!!"
I'm getting errors about the presence of jump there, but I'm not sure if there's another way to do this? ^^;
This is of course not the final text, btw. XD I'm hoping it will sound less lame by the time I get to the actual dialogue. *lol*
And also, is there a way to use "if quiz1_win" and "if quiz2_win" in the same line? To get to something the character wouldn't get to unless he wins both quizzes? Because in the example I wrote it's using the results independently, while it would be good if the character could give a different response if the player got everything right in the different quizzes.
Or would I have to use the point system for that? (I'm looking into that and it seems very interesting too, but maybe I'll combine both the quizzes with win or lose results, and the points for something else.)
Sorry for so many questions, but while I'm asking about the quizzes, if a character jumps back to a past quizz again, and retake it if they failed the first time, will ren'py remember their victory gotten the second time, or the initial loss? So, will they be able to retake quizzes they failed, or will they be screwed and have to have a bad end and redo the game to get the right path?
I'm still a bit tangled with how I'll make it all work together, but I'm learning along the way and it's also being very fun.
So right now I'm very happy and hopeful about the game and the story coming alive.
Thank you so much for your patience and for all the help, your posts are very helpful!
(I'm a bit of a forum stalker collecting code from many people in various other threads whenever I find something that helps what I have in mind for my game, as you must have noticed from my other post. XD)