How do I set up a database to display random questions?

Get help using Construct 2

Post » Fri Oct 16, 2015 3:19 am

B
67
S
24
G
7
Posts: 1,518
Reputation: 11,072

Post » Fri Oct 16, 2015 6:17 am

Korbaach,

I would like to use sprites for the answers instead of text objects and was wondering how to associate images with the text information stored in the array in your example.

Thank you for all your responses, by the way.
B
19
S
3
Posts: 62
Reputation: 1,764

Post » Sat Oct 17, 2015 8:07 am

Minoterrae wrote:I would like to use sprites for the answers instead of text objects...


even simpler..just instead of text store frames...
so you need one "SpriteAnswers" with many frames as you need(0,1,2,3...44....77...254...)..
and then just follow pattern..
Image


FINDaLLpIC.capx
B
67
S
24
G
7
Posts: 1,518
Reputation: 11,072

Post » Sat Oct 17, 2015 2:25 pm

Greatly appreciate the education. What further change would be needed so that questions which are correctly answered are not asked again? I.e. only unanswered or incorrectly answered questions are able to be asked?
B
2
Posts: 2
Reputation: 154

Post » Sat Oct 17, 2015 7:27 pm

DaddyBot wrote: What further change would be needed so that questions which are correctly answered are not asked again? I.e. only unanswered or incorrectly answered questions are able to be asked?


Ok.
so..now.. when you answer on question(correct or not,irrelevant)..that question does not appear in game again..
do you know why?

in example..event 4..function "RandomizeQuestionOrder"...have 2 loops
Image
so..after second loop,"ArrayQuestionOrder" looks similar to this(4,9,2,10,5,1,7,6,8,3)
(first question is no4,then no9..etc)
then.. in second function
Image
after you set question....action- delete inex 0 from ArrayQuestionOrder..delete that question
(first question is no4,then no9..etc)
Image
so..you always ask question on index 0..ask-delete..ask again ..but now the question
that was the second(index 1), is first(on index 0)... :?

to prevent this..just move action in
Image
now..only if answer is correct you will delete that question...

but..what will happen if the answer is incorrect..nothing.
.you would be constantly asked the same question,until you answer correctly..

so you need ..if answer is incorrect
Image
you push that question on end of the line
Image
B
67
S
24
G
7
Posts: 1,518
Reputation: 11,072

Post » Wed Oct 21, 2015 5:16 pm

Korbaach,

In the FindAll examples you've done, how would you handle a mouseover event that would popup a hint or tooltip of some kind next to the answers being listed, perhaps a rectangle graphic containing text that would give some kind of small clue to the user?

For instance, in the Fictional Character question, a mouseover for each name would cite what book or movie that particular character first appeared in.

Thanks in advance,
B
19
S
3
Posts: 62
Reputation: 1,764

Previous

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 16 guests