How do I do this Quiz better?

Just started using Construct 2? Post your questions here

Post » Sun Nov 22, 2015 12:59 pm

Hello everyone. First post here, sorry if I'm asking an idiotically simple question. I'm basically making a learning/testing game thing, and this is what I have so far:
Image
(speaking of which, is there a simple way to export 1 event sheet without having to link the whole complicated .capx?)

It is essentially a game where the player clicks the speaker icon and a number is spoken out, and the player must select that number from on the screen. If correct, a "Yay" sound plays, and the next number starts (which the player must then click the speaker on to hear and then select, etc.). There are 5 total questions and the player must get at least 3 correct. The numbers are chosen at random (from out of 5 at this level).

There is a quiz example on this site here, but it seems to be somewhat different (and not random). I realised after the fact, that the way I'm doing it now would require way too many blocks if I want to have the sound play automatically (and if I want to have a "tick" show at the correct answer if the player clicks the wrong answer).

So I ask, is there a better way to do this?

PS: When I had the last condition set to Qnum=4, it completed (as if correct) after only 2 questions. Now that I've set it to 3, it seems to continue forever.
PPS: "Cheeko" was an Audio object from one of the first layouts in this project, but after I created it, the "Audio" option disappeared from "Insert Object", so I had to put everything in Cheeko for the rest of the project. Is this normal?
B
4
Posts: 8
Reputation: 216

Post » Sun Nov 22, 2015 2:04 pm

Having just learnt about blank subevents, I've made these modifications (and I hope double-posting is not a huge wrong thing to have done):
Image

(tapping on 2TestBtn through to 5TestBtn is similar to 1, so I've condensed it in the image for neatness).
B
4
Posts: 8
Reputation: 216

Post » Sun Nov 22, 2015 3:38 pm

Don't test for not-equal right after checking for equal - use an Else instead. Right now event 9 will run, set QuizAnswer to something else, then event 10 will run, since you've just forced QuizAnswer to not be 1 anymore. 'Else' will only run 9 or 10, never both. This applies to anywhere else you check for "something", then check for the "opposite".
ImageImageImage
B
71
S
21
G
204
Posts: 3,586
Reputation: 115,576

Post » Sun Nov 22, 2015 5:39 pm

blackhornet wrote:Don't test for not-equal right after checking for equal - use an Else instead. Right now event 9 will run, set QuizAnswer to something else, then event 10 will run, since you've just forced QuizAnswer to not be 1 anymore. 'Else' will only run 9 or 10, never both. This applies to anywhere else you check for "something", then check for the "opposite".

Thanks, that actually fixed up my PS issue!
B
4
Posts: 8
Reputation: 216

Post » Sun Nov 22, 2015 6:54 pm

..if you use just one "testBtn" Sprite object (5 frames&animation speed 0)..
you can compare frame and QuizAnswer variable...

Random5.capx
Image
B
62
S
23
G
7
Posts: 1,470
Reputation: 10,731

Post » Sun Nov 22, 2015 7:10 pm

I can't open your capx because apparently I'm using an older version of C2. Can't change right now, because I'm collaborating with someone else who is using the same version.
Anyhow, unless I'm explaining very badly, I'm not sure I can use frames, as all 5 buttons are showing at the same time...
Image
Those are 1TestBtn through to 5TestBtn (and NumberSoundBtn).
B
4
Posts: 8
Reputation: 216

Post » Sun Nov 22, 2015 8:39 pm

There's no problem with different instances showing different frames..
You don't even have to do it through events, just change the frame in the properties of the sprite in the editor..
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Sun Nov 22, 2015 9:05 pm

So I see now. Thank you korbaach, I can't thank you in PM yet, I got the older version...I'm trying to make sense of it, will understand it slowly. You've done what I wanted perfectly, almost making me want to copy it verbatim :D.
B
4
Posts: 8
Reputation: 216


Return to Beginner's Questions

Who is online

Users browsing this forum: No registered users and 0 guests