Hi, I’m a total beginner to programming and unity.
I’ve spent most of this day trying to learn and figure out a way to make a “language learning game” in unity.
the idea is quite simple: a edu game for learning swedish.
A text is displayed on the screen with (english) sentences, the user has to fill in the correct words in Swedish.
It will be a good game to memorize sentences in a foreign language. Planning to give out the game for free,
just to bless people. If you can please help me and my wife with some code it would be amazing, we’d love to link to anyone who contributes.
I want to minimize the “coding work burden” by being able to make all of the game-questions inside of unity.
I guess what we need is a string array, a text input field,
but we don’t know how to start making the game.
We followed “Brackeys” tutorial on youtube for the “quiz game” but that is with bools and click and play-game.
We want to use input fields so the user has to input correct swedish words, not click with mouse. (maximize learning)
The idea is that the fieldinput should match strings in the array and be checked off (not showed again), and random displaying of questions on every “page”. Some kind of event to make new questions appear, and so on. And we want to add questions easily within unity so that we don’t have to code hundreds of “if” statements in monodevelop.
some advice and code examples would be so cool!
Thanks / Daniel
Put all your questions in a List and all you correct answers in a matching List. Create an int that adds 1 every time a question is answered. Create a function that finds out if the input string and the correct answer match. Do something with that output whether correct or incorrect. Put a button that submits the input answer to that comparing function. Add 1to the question int that is indexing your List questions and correctAnswers and make another function called from there that passes the incremented int to display the next indexed string in your list and is used for comparing the correct answer string at the same index.
I appreciate the tip but I imagine that serialization is a bit over their heads. You did not state how to access those classes. That is the conundrum with these folks. They need a step by step roadmap.
That’s fair - I fully expected a follow-up question about accessing class members. I just wanted to provide a more extensible solution that would cause less headaches as they continued to develop more functionality.