applern's Forum Posts

  • I downloaded it from my site and it opened fine...

    I made it in the R189.2 stable version - what version are you using?

    It worked ! Thanks!

  • I downloaded it from my site and it opened fine...

    I made it in the R189.2 stable version - what version are you using?

    Thanks. I was using an older version. Downloaded. I'll check and see. Sorry for wasting your time!

  • here is a quick sample:

    https://rieperts.com/games/forum/AppleTree.c3p

    I can't open it?

  • if you don't care which apple gets destroyed you could use System - Pick a Random Instance, and then destroy that one.

    If you give them bullet behavior (turned off by default), then you could activate it and have the apple "fall" out of the tree.

    What would be the code for that?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hello.

    So in my project when you do a correct answer an apple shows but when you do it wrong an apple goes. I clone each apple when you do a correct answer but how to destroy a clone?

  • You are looking for the System action Create object. It is used to create an instance of an object type at a given position and layer.

    Thanks!

    [giphy=

    ]

  • 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!