In my game, in the beginning, I want there to be a quiz. This quiz determines which character you'll chase romantically through the whole game.
So if you choose a bunch of billy answers, you'll end up with billy chapter 1 and so on. I think I saw the code for quizzes but nothing like this. Any help would be really appreciated!
I'm trying to code a specific quiz mini game? [SOLVED]
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
-
- Newbie
- Posts: 3
- Joined: Wed Jul 24, 2019 1:34 pm
- Contact:
I'm trying to code a specific quiz mini game? [SOLVED]
Last edited by Queenofwands on Wed Jul 24, 2019 4:09 pm, edited 1 time in total.
-
- Regular
- Posts: 29
- Joined: Sat Jul 13, 2019 3:35 pm
- Contact:
Re: Please help, I'm trying to code a specific quiz mini game?
Something like this?
If you have a later chapter w/ two or more characters you can have something like:
Code: Select all
default love_billy = False
default love_dee_williams = False
define billy = 0
define mandy= 0
define jack= 0
define joel= 0
define dee_williams = 0
menu:
"Question 1: Billy or Mandy?"
"Billy":
$ billy+= 1
"Mandy":
$ mandy += 1
menu:
"Question 2: Billy or Jack?"
"Billy":
$ billy+= 1
"Jack":
$ jack+= 1
menu:
"Question 3: Billy or Joel?"
"Billy":
$ billy+= 1
"Joel":
$ joel+= 1
If billy >= 3:
$ love_billy = True
jump billy_chapter
else:
"I guess you just don't love Billy enough!"
jump die_alone_and_miserable
Code: Select all
"Hey, there's Billy and Dee Williams!"
menu:
"Say hi to Billy." if love_billy:
$ billy += 2
"Say hi to Dee Williams." if love_ dee_williams:
$ dee_williams+= 2
"Nod to Billy and Dee Williams.":
$ billy += 1
$ dee_williams += 1
"Punch Billy in the face." if billy <1:
$ billy -= 1
$ dee_williams += 1
"Run away and hide.":
jump die_alone_and_miserable
-
- Newbie
- Posts: 3
- Joined: Wed Jul 24, 2019 1:34 pm
- Contact:
Re: Please help, I'm trying to code a specific quiz mini game?
Thank you so much! Just tested it out and it works like a charm!
I just had to put the right indents and spaces.
I just had to put the right indents and spaces.
-
- Regular
- Posts: 29
- Joined: Sat Jul 13, 2019 3:35 pm
- Contact:
-
- Regular
- Posts: 29
- Joined: Sat Jul 13, 2019 3:35 pm
- Contact:
Re: I'm trying to code a specific quiz mini game? [SOLVED]
You might also want to look at https://renpyhelpdesk.tumblr.com/post/8 ... ngs-anyway
Who is online
Users browsing this forum: No registered users