applern's Forum Posts

  • If I understand you correctly, you want the CorrectandWrong text to display "Wrong" if the user selects an incorrect answer or doesn't select a correct answer. If that is the case then set the text to "Correct" at the start of the function and then set the text to "Wrong" in the conditions where you add 1 to n.

    Okay. How to add previous button. Do we subtract one from current question?

  • > Also what if The person presses submit and no answers were checked? It should be wrong.How to code?

    It's up to you to decide how you want to represent that information to the player. As I mentioned above, if you're using the ticks/crosses to indicate the correct answers then it won't always be clear what the user's result was. That's why I suggested using tick/crosses to grade the selections and setting the correct answers text to green, so the user can differentiate between the correct answers and their selections.

    Yeah so tick and cross should be there but i have a text that says you got the answer wrong/right. so right now the text is working. But when i did

    + Answers: [X] Is checked
    -> CorrectandWrong: Set font color to rgbEx(255, 21, 21)
    -> CorrectandWrong: Set text to "Wrong"
    

    the code affected another code that sayas if you got it correct it would say wrong.

  • > I'm not sure what you mean by "restarting arrays".

    So You know the restart button on the 'End' layout? When you press that it should go back to Quiz layout and back to a qUESTION 1 Also what if The person presses submit and no answers were checked? It should be wrong.How to code?

    Actually I got how to restart

  • I'm not sure what you mean by "restarting arrays".

    So You know the restart button on the 'End' layout? When you press that it should go back to Quiz layout and back to a qUESTION 1 Also what if The person presses submit and no answers were checked? It should be wrong.How to code?

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • If you want all of the ticks/crosses to show then don't set any to invisible and just set the tick/cross on the conditions that test if the answer is correct/incorrect:

    If you do that then you won't need to set the text to green as the tick is already displaying the correct answers.

    Bear in mind that it won't be as obvious to the user how you're scoring the answers; ticks and crosses are typically used to mark user choices rather than flag the correct answers so it may be difficult to discern between a tick indicating a correct answer or a correct selection, especially when there are multiple correct answers.

    Thank you! It all makes sense now. I feel bad asking you so can you direct me to a forum that helps in restart ing arryas?

  • Upon submitting, the current set-up will display:

    1. Correct answers in green text (regardless of whether or not they've been selected)

    2. A tick next to correct selected answers

    3. A cross next to incorrect selected answers

    If that's not the desired output, please let me know what you want to display for the following use case scenarios:

    1. Correct answer selected

    2. Incorrect answer selected

    3. Correct answer not selected

    4. Incorrect answer not selected

    To clarifY:

    On submit pressed

    All correct answers green whether or no they were selected (optional)

    Tick mark next to all correct answers whether or no they were selected

    Cross mark next to all wrong answers whether or not they were selected.

  • I've updated the project again to show what I mean - grab latest:

    https://www.dropbox.com/s/8rxd49g89k9zyxo/quizApplern.c3p?dl=0

    So I set spr_TickCross to invisible in event 21 but it didnt show wrong sprite. Here is the code

  • If you don't want answers that havn't been checked and are incorrect to display a tick set those ticks invisible in the checkQuestion function.

    I dont understand

  • Here you go:

    https://www.dropbox.com/s/8rxd49g89k9zyxo/quizApplern.c3p?dl=0

    The score wasn't being tallied because the "selected" boolean was being used to check for a correct answer but it wasn't being set anywhere. However, you don't need to use that boolean any more because you can just check if the answer boxes are ticked.

    I've tidied up a few other things and added comments to explain the changes.

    A couple of suggestions for keeping healthy code:

    1) Keep an eye out for events that are unnecessarily running every tick - they can end up slowing things down. There were a few that needed to be nested under a triggered event.

    2) Avoid repeating triggers with different conditions e.g. On button pressed, do action A; On button pressed, do action B. Instead just have one "On button pressed" trigger, then action A and action B as sub events.

    In my version the correct for 1st Q the correct answer is 3, but for yout version its all of them. This keeps happening for multiple questions

  • In the Share object there is the ability to have a Rate popup message.

    In the object parameters box for Share there is the box App ID.

    In this I've put the following: "com.url.appname" - however this doesn't work on iOS.

    Have I entered the wrong App ID? Is there something else I'm meant to put in here instead?

    Cheers all :)

    On ios devices there is already a " in-built request app rating dialog, which has predefined text" Also customizing where the review should pop up may not work. As the forum says

    Here is the forum where Ashley and Nepeo have written about the share plugin

  • applern You haven't included a link to your app - post it up and I'll take a look.

    Sorry, Here. drive.google.com/file/d/1v59w-puMMZF4W2h8CaXZsB-NTxo3_YnL/view mekonbekon

  • You could either create a separate 1D array (e.g. a_questionTimes) or use the indices at a_questions.At(0,currentQuestion,1)

    Thnaks mekonbekon. Sorry for the late reply. I've been trying to make the score work but its not. Here's my app. Do you think you could identify the problem and tell meh hoew to fix it?

  • LoopIndex returns current stage of your loop. "Index of Question" uses Loopindex.

    0 - first question

    1 - second question

    2 - third question

    & etc.

    I dont understand what i'm supposed to do

  • LoopIndex returns current stage of your loop. "Index of Question" uses Loopindex.

    0 - first question

    1 - second question

    2 - third question

    & etc.

    Could you write that out in code please. I still dont understnad?

  • Why you're using "Z" Array. You don't deal with anything that complex.

    XY will do just fine. All you need is Index of Question (to address it later with loopindex) & then index of variable (0 - answer true or false, 1 - timer)

    QuestionTime variable doesn't make sense.

    I dont understand what Index of Q means?