applern's Recent Forum Activity

  • You do not have permission to view this post

  • Okay so if we the 2nd method, Let's say you get the 1st answer correctly. Add 1 to correct and show seed. If it's the wrong the same thing but don't do anything and add 1 to wrong.

    But what about the 2nd question. There are 3 possibilities. If you get the 1st question wrong, and 2nd question correct it'll show seed. If you get both questions wrong. It'll show 'X'. If you get both questions right it'll show sapling. There are too many possibilities as you increase the question no.

  • I don't see any pictures in your message...

    Like I said, try adding "Wrong=0" conditions to your events "Correct=8", "Correct=9" and "Correct=10".

    If this doesn't work, change the code to run only when you press the "submit answer" button, not on every tick.

    The first method didn't work because if it was 1 or something the whole thing would go. I dont understand the 2nd method

  • I don't see any pictures in your message...

    Like I said, try adding "Wrong=0" conditions to your events "Correct=8", "Correct=9" and "Correct=10".

    If this doesn't work, change the code to run only when you press the "submit answer" button, not on every tick.

    I idd it right now

  • as a quick fix, you can try adding "Wrong=0" conditions to your events "Correct=8", "Correct=9" and "Correct=10". But then the order of events becomes important. I really suggest getting rid of the "state machine" code and do this with triggered events and functions.

    What does 'state machine' mean. Can you write the code you suggested in the

    Code format?
    

    Thanks. Also here are the code screenshots.

    Correct

    Wrong

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • In my app when you do a correct answer an apple blooms on the tree and when it's wrong an apple falls. If you have it correct it adds 1 to ("correct" variable) and the code has created an instance of apple at a random place.

    so here are a few eg

    + System: Correct = 8
    -> Seed6: Set visibility Visible
    -> Apple: Set visibility Visible
    ----+ System: Trigger once
    -----> System: Create object Apple on layer 0 at (random(82,701), random(31,274))
    
    + System: Correct = 9
    -> Seed6: Set visibility Visible
    -> Apple: Set visibility Visible
    ----+ System: Trigger once
    -----> System: Create object Apple on layer 0 at (random(82,701), random(31,274))
    
    + System: Correct = 10
    -> Seed6: Set visibility Visible
    -> Apple: Set visibility Visible
    ----+ System: Trigger once
    -----> System: Create object Apple on layer 0 at (random(82,701), random(31,274))
    

    Now if you press the wrong answer it'll make an apple fall(using Bullet behavior) and adds 1 to "wrong" (variable)

    eg:

    + System: Wrong ≥ 1
    --------+ Apple: Is visible
    --------+ Seed6: Is visible
    ------------+ System: Trigger once
    ----------------+ System: Pick a random Apple instance
    -----------------> Apple: Set Bullet Enabled
    -----------------> Apple: Move to top of layer
    -----------------> Apple: Set Bullet angle of motion to 90 degrees
    
    ------------+ Apple: Y > 600
    -------------> Apple: Destroy
    -------------> System: Subtract 1 from Correct
    -------------> System: Set Wrong to 0
    

    The problem is let's say you're correct variable is currently 9 and you have 2 apples. You do the wrong answer so the correct variable should be = to 8 and one apple falls down. So you're left with 1 apple. Then let's say your next question is wrong. So the variable will become 8, and an apple falls down and you should have no apples left. But the problem is there will be an apple left why? because my code says if you have 8 as your correct variable it'll add one. Even if it's wrong. Is there a way to stop creating an apple?

  • You do not have permission to view this post

  • You do not have permission to view this post

  • You do not have permission to view this post

  • You do not have permission to view this post

  • Key events are missing such as when and how do you add 1 to wrong? Can't really figure anything out from this code.

    I addd 1 to wrong, when the wrong answers are pressed. Once it does the required action I set 'Wrong back to 0

  • Definitely an easy fix, easier to work out if you share the file

    I'm sorry but, I'm not allowed to. This is the most i can give you :( I really wish i could tho 😔😔

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