question based game

Get help using Construct 2

Post » Fri Mar 15, 2013 9:32 pm

Hey people! Just joined!

I want to make a question based game, with 3 answer choices for kids by using phonics as a basis for the questions, anyone got any useful tips for me? :)

I can find plenty of tutorials to make shooting games, but none on a question + answer game using images for the questions and answers.

Any replies are greatly appreciated! Thanks again!
B
6
Posts: 14
Reputation: 514

Post » Sun Mar 17, 2013 4:59 am

ok Ive made a sample of it im sure its messy but its just sample.

First create a global variable in the event sheet call correct

create one text and one button change all button to check box (Button>properties>Type to checkbox.

Drag clone three button. click on each of the button and change their instance number (Button>properties>ID(optional) to 1 , 2 , 3. Go to your event sheet and create an group event call it First question.

First line in the group Event first question.
System>compare variable(now it should have correct variable leave it at =0. For action go to Text>set text (to the question you want)

next line do Button>Pick by instance to 1 And add in System >compare variable to correct 0. For action Set button>Set text "to what ever you want"

Do repeat for 2 3 button

For the correct answer add this to next line Button>pick by instance(#) add in another condition Button>if checked Add another condition System>global variable=0. FOr action SET text to Correct Add another action System Add variable to correct 1 add another action Button unchecked

Do the same for second question only changing the system>Global variable correct to equal 1.

So on so on... again this is what i found it may be messy but it does work. This is the basic ive found any more question ill try to answer.


dragoonblade2013-03-17 05:23:43
B
7
S
2
G
3
Posts: 58
Reputation: 2,284

Post » Mon Mar 18, 2013 12:52 am

This thread should help you out:

http://www.scirra.com/forum/making-a-quiz-game_topic50656_post319359.html#319359

I believe it has an example of a quiz game that you can download in one of the replies as well.
B
21
S
7
G
5
Posts: 89
Reputation: 5,967

Post » Tue Mar 19, 2013 2:30 am

Brilliant guys, thanks so much!

Just a few more things though, How would I replace the buttons with images rather than text?

And how would I make a button play a sound when clicked?

And finally, I got up-to this part:
"Next line do Button>Pick by instance to 1 And add in System >compare variable to correct 0. For action Set button>Set text "to what ever you want"

But weather I'm adding a line or a new event, under the button> There isn't an option for pick by instance, the closest I can find is Pick by unique ID? Sorry if I'm being an idiot :(

Thanks again! gordo1472013-03-19 02:55:17
B
6
Posts: 14
Reputation: 514

Post » Tue Apr 02, 2013 12:52 am

Sorry for taking so long to respond, hopefully you found the answers by now, but if not:

To replace buttons with images, you are going to have to make new sprite objects and just copy all of the actions that the buttons were doing to it (there might be an easier way, but I don't know of it).

To make a button play a sound when clicked, you have to add the audio and mouse (or touch) objects to your project. Then add the event "on click object" (set the object to the button), and then add the action "play audio". You will have to import a sound first though before it will appear in the actions drop-down options.

And I'm not sure about the pick problem (I'm terrible as using the pick actions as well), maybe post another thread about it? Or there might be something about it elsewhere on the site.
B
21
S
7
G
5
Posts: 89
Reputation: 5,967

Post » Thu May 02, 2013 12:40 am

Hey Rabid, Sorry for my super late reply as well, I hadn't found a fix for the sound issue, but you've just explained that so thankyou!!

And you say i should make sprites and treat them as images rather than using buttons and editing them, that sounds like a good idea, but can i still make it's properties a checkbox type so it still works with Dagoons example from above? :D

Thanks again!
B
6
Posts: 14
Reputation: 514


Return to How do I....?

Who is online

Users browsing this forum: GUN, MrLOL64 and 18 guests