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.
My suggestion may be is OO or function to handle this.
You can create dict or some objects like arrays of arrays or some data structures that will have questions, answers and correct answers. So you can make functions to pick a question, display answers and later after user submit the answer you need a function that validate based on the question loaded
- Lemma-Class Veteran
- Posts: 2712
- Joined: Mon Dec 14, 2015 5:05 am
- Location: Your monitor
Then use the choice menu to increment the chosen option by +1 each time it is selected.
When the quiz reaches the results screen you can show which option was most selected or a percentage or whatever, based on those variables.
pro·gram·mer (noun) An organism capable of converting caffeine into code.
Actually finish a project
- Miko-Class Veteran
- Posts: 694
- Joined: Mon Jan 07, 2019 2:55 am
- Projects: Maddox's Everyday Talk! (13+ Unreal version), Maddox Everyday Talk! (3+ Real-Friendly version)(Upcoming 2020)
- Organization: Friendly Teachers series
- itch: .......
- Location: Philippines, Mindanao
This is about results, not good at making this, but take a try.
Code: Select all
default correct1 = False default correct2 = False default wrong1 = False default wrong2 = False
Code: Select all
label quiz: menu: "What is the third planet on the solar system?" "Earth": jump earth "Neptune": jump neptune label earth: $ correct1 = True "You got the correct answer!" jump quiz2 label neptune: $ wrong1 = True "Wrong!" jump quiz2 menu: "What is my personality?" "Kind": jump kind "Bad": jump bad label kind: $ correct2 = True "You got it!" jump results label bad: $ wrong2 = True "Nahahh" jump results label results: if correct1 and correct2: "You got A!" return elif correct1 and wrong2: "You got B!" return elif wrong1 and correct2: "You got C!" return elif wrong1 and wrong2: "You got D!" return
Working on a talking simulation game for everyone, except children.
Maddox Everyday Talk!
Is my very very main project, not contain 13 below.
Main project here viewtopic.php?f=43&t=56564
Users browsing this forum: Google [Bot], Majestic-12 [Bot]