- Home /
Question and Answer Menu
Hello all virtual living people :) Halo 4 is out and looking forward to play it
any who.
I am making this small little game which is : question with answers that will affect a particle moving into a calculated direction which is located on top of the question window. There will be a timer, and a gauge that will indicate 5 colors.(like a car gauge)
my question really is:
how can Call in these questions, and how can I make the gauge, time, and my 3D particle simulation work all together at once.
ex:
-Question comes up
answer it correctly
-The particle 3d animates moving into a set direction/Location
This will hap end for all the questions
if the question is answered incorrectly, the 3d Particle will move for example down.
Thank you all for any help
Answer by SomeGuy22 · Nov 08, 2012 at 01:33 AM
Really rough but an easy way to write that would be:
var particle : Transform;
function Start ()
{
AskQuestion();
}
function AskQuestion ()
{
//do something with GUI and have a text field or buttons to press or enter
//Also you'd want to make a timer that sets how long this GUI should be up
if (answer == correctAnswer)
{
particle.transform.position.y -= 1;
}
//ideally you'd want this function to be in a for loop
}
Answer by aiibee · Nov 08, 2012 at 09:53 PM
ok, I have an issue.
I have attached images in this post so it is more easy to understand what i am trying to explain.
What you see is a computer screen , there are 2 items that will work together. On the red you will see questions come up what the user will have to answer. On top the blue area, there will be a 3d object shown that will move or trigger a animation. The animation or move will accrue when the user has selected a answer. Depending on the answer it will move to a set location.
I am unsure on how to set up my scene. Do I need to create 2 cameras, and tell the first camera to display the second camera at a set resolution. ???
or do I need to create a new scene??
Need help Please
You should've posted this as a comment ins$$anonymous$$d.
For something as simple as this you shouldn't use 2 cameras, just place the object in the top one.
You need to look up GUI or at least get a better understanding of progressive menus before asking here, as you're likely to get little results asking simple questions.
Thank you for your help, I am learning and i am not as good as you. But I really want to learn. They are simple questions, but to me its a process to move forward and learn more. I am thankful for your responds.
How i made my menus now is by making them in 3D and assign a box colluder.
For the camera part, I did create the 2 cameras and I managed to get the result i needed.
However, I plan on adding a gauge, like a car gauge that will measure a difficulty level, well as time display.
Should I create a other camera, or will this be done with the GUI ???
Thanks in advance for any help.
Regards, Aldin
No problem, I'm happy to help--we were all beginners at some point ;)
Something like a car gauge will require scripting, and thus it is optimal to use GUI ins$$anonymous$$d.
Take a look here to get started: http://forum.unity3d.com/threads/63885-Car-speedometer-dial
Answer by aiibee · Nov 19, 2012 at 11:08 PM
ok, i have added an image example on what I want to create. Please let know if this is clear to understand.
What you have there is just a simple series of On$$anonymous$$ouseDown and movement adjusting. Depending on how you want to move the box you can just transform.position.x += speed *Time.deltaTime or a similar method. For your solution you can use GUI and store a variable with the answer info.
You can't expect people to write your whole script, so you should try asking specific questions first.
thank you, I am learning java scripting, and i am trying to figure out what the best and clean way to construct this.
I don't know if i want to use GUI text, but i am unsure how to use that.