applern's Recent Forum Activity

  • Hey.

    So I have a game and whenever you answer a question correctly it adds an apple to the appletree. I don't know how to clone sprites while the game is happening. Please help.

  • Look closely at my code. "Submit is clicked" is the parent event. It has a sub-event where you compare multiple checkboxes. Else condition is under that sub-event, on the same level.

    It created the same problem as before. When I checked A and B etc. it worked. But when

    i pressed A C and E it didn't work and added 2 to correct instead of none. Attached is my code

  • Look closely at my code. "Submit is clicked" is the parent event. It has a sub-event where you compare multiple checkboxes. Else condition is under that sub-event, on the same level.

    Ok but Else cannot have a triggered condition in its same event

    Submit is clicked
    .... is checked 
     	.... is checked (the winning combination)
    	.... is checked
     		Add 1 to Correct
     	Else 
     Submit is clicked
    		Add 1 to Wrong
    

    The code doesn't work because submit is a button, and if I don't that then when the game begins it automatically adds 1 to wrong because nothing is checked which comes under 'Else'

  • Look closely at my code. "Submit is clicked" is the parent event. It has a sub-event where you compare multiple checkboxes. Else condition is under that sub-event, on the same level.

    Oh got it. Let me test it out

  • Look closely at my code. "Submit is clicked" is the parent event. It has a sub-event where you compare multiple checkboxes. Else condition is under that sub-event, on the same level.

    I though else cannot be a sub-event

  • Where is that "else"? I can't make sense of your code..

    If only one combination of checkboxes can be correct, all you need to do is this:

    > Submit is clicked
    
    	.... is checked 
    	.... is checked (the winning combination)
    	.... is checked
    		Add 1 to Correct
    	Else 
    		Add 1 to Wrong
    

    Note, I recommend changing Submit to a button, this way you will not have to use "Trigger once" (which can cause different problems in this code).

    yes but, the event 'else' does not work if there is a triggered event.

    such as 'Submit is clicked' above it

  • Due to some, uh, restrictions, I cannot post my project file.

    But I can give you my screenshots😊

    Here's the code

    and

    the else

  • Try this:

    > C checked 
    and E checked
    and Submit checked
    	B checked -> wrong
    	else -> correct
    

    I tried this by doing

    > C checked 
    and E checked
    and Submit checked
    	B checked
    and D checked
    and E checked -> wrong
    	else -> correct
    

    It didn't work.

    Also else cannot be used as a sub-event

    I also tried

    > 	B checked
    

    and D checked

    /code]

    and

    > 	B checked
    

    and E checked

    /code]

    and so on

    None of them worked

  • Try this:

    > C checked 
    and E checked
    and Submit checked
    	B checked -> wrong
    	else -> correct
    

    Thanks, it worked!

  • Have you checked the Demo Quiz?

    I already answer another Topic from you and now I realize my answer may not work completely.

    What I would do is:

    Use a button to submit the answer

    Button -> On Clicked

    First Disable the button (we avoid checking more than once)

    If (C and E are checked and B is not checked) do { something }

    If (B is checked) do {something}

    As you said the B is checked I already have an else button.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Have you checked the Demo Quiz?

    I already answer another Topic from you and now I realize my answer may not work completely.

    What I would do is:

    Use a button to submit the answer

    Button -> On Clicked

    First Disable the button (we avoid checking more than once)

    If (C and E are checked and B is not checked) do { something }

    If (B is checked) do {something}

    No I haven't seen it. Thank you

  • As far as I understand in any case scenario, if B is checked, the answer is wrong.

    If that is true, then in the second part just check B.

    Yes, but I will be exporting this game and others will play through which I don't have control. If they do B C and E what do I do

applern's avatar

applern

Member since 7 Oct, 2019

None one is following applern yet!

Trophy Case

  • 5-Year Club
  • Email Verified

Progress

6/44
How to earn trophies