How To Show Right and Wrong answer in Qiuz Game
perintang5
Member Posts: 4
Hai,
Im doing multiple choice quiz game, my problem is... how to show the correct answer with green color when i click the right answer and wrong answer red color.
Comments
YouTube has a lot of tutorials. I reccomend doing a search there first if you get stuck. Also try to google your problem since 99% of the time your question has already been answered.
Here is a youtube link to what you are asking for:
Tq Dues,
I already watch the video, but what I'm trying to do is.. When the right answer is click, the answer will change to green and another wrong answer change to red color. example like this :>
https://lh3.ggpht.com/nHITI0dj76hKbj6iTSTKT_h2FveOIDAhcpacciDLyu6hQRRrKYTfASjBOA3zmDhbJ58=h900
The key is in organizing your answers in a table and knowing when an actor is clicked it is a right or wrong answer. Use that info in a rule to change the color.
Guru Video Channel | Lost Oasis Games | FRYING BACON STUDIOS
Tq, Lost_Oasis
Do you have example..
Yeah that is a very old method as now we can compare variables from tables in a rules conditions.
Make your compare rule like this
Rule
When touch is pressed
Rule inside touch rule
Text expression table cell value (table,question.number,1) is table cell value (table.question.number,6)
Change attribute game.score to game.score+1
Change attribute game.questionanswered to game.question.answered+1
Rule inside touch rule
Text expression table cell value (table,question.number,1) isnot table cell value (table.question.number,6)
Change attribute game.questionanswered to game.question.answered+1
Rule outside touch rule
All
When Text expression table cell value (table,question.number,1) is table cell value (table.question.number,6)
When game.questionnumber = game.question answered
Change color code To green
Rule outside touch rule
All
When Text expression table cell value (table,question.number,1) isnot table cell value (table.question.number,6)
When game.questionnumber = game.question answered
Change color code red
Rule outside touch rule
When game.question.answered = game.question.number
Change to default color
In your question actor add this code to cycle to the next question
Rule
When game.question.answered = game.question.number
Timer
After .5 seconds
Change attribute game.question.number to game.question.number+1
Guru Video Channel | Lost Oasis Games | FRYING BACON STUDIOS
Tq Lost Oasis
But im still stuck.. can i send you my project and hope you can edit the rule for me...