Trivia Game Ajax

Get help using Construct 2

Post » Tue Jan 07, 2014 5:29 pm

Hi Guys,

So i found this great quiz example made by procrastinator.
It contains 5 questions, but im having trouble adding more questions to the txt file..
Everytime i do add more questions, the answers end up like this:
0
0
0
0

Does anyone care to take a look, and see if you can explain how its done?
- im really stuck on this one, since math isnt my strong side.

The capx is here:
https://dl.dropbox.com/u/666574/kevinmthomas%20-%20trivia%20game%20AJAX.capx





Thanks in advance!
xanxion
B
37
S
9
G
8
Posts: 541
Reputation: 8,554

Post » Tue Jan 07, 2014 6:26 pm

The Answers action on event 23 is wrong. Should be:

Answers: Set size to (5, AnswersOriginal.Height, 1)
ImageImageImage
B
71
S
21
G
221
Posts: 3,649
Reputation: 124,227

Post » Tue Jan 07, 2014 6:49 pm

[QUOTE=blackhornet] The Answers action on event 23 is wrong. Should be:

Answers: Set size to (5, AnswersOriginal.Height, 1)[/QUOTE]




Sharp spot.


edit: I had to set mine to 6 though

edit 2: Seems like you need to set to the amount of question you have : "numberOfQuestions"lennaert2014-01-07 18:54:22
Who dares wins
B
57
S
17
G
21
Posts: 1,878
Reputation: 19,562

Post » Tue Jan 07, 2014 7:53 pm

blackhornet - lol thanks for spotting that Sir, i was way off on that one.
I really apreciate your help.

Works great now!



Thanks again, saved me some time there!
B
37
S
9
G
8
Posts: 541
Reputation: 8,554

Post » Tue Jan 07, 2014 7:54 pm

lennaert - it works here with just 5.
Not sure if "numberOfQuestions" is needed.
I think it auto calculates or something via ajax and newlines in the txt files. Pretty complicated stuff :P
B
37
S
9
G
8
Posts: 541
Reputation: 8,554


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 9 guests