How do I (IDK how to say this #2)? [SOLVED]

  • I'm sorry, But I didn't know how to explain my situation in the title

    Situation

    Like before, in my app, there's a tree. And each time you press the correct answer a new apple will pop up. And if it's wrong it'll fall down. I have 2 variables: "correct" and "wrong".

    So if you get it wrong then add 1 to wrong. Make apple fall, the set "Wrong" to 0.

    And if you get it correct,

    then add 1 to correct. Add an instance of apple, then add to correct.

    So the problem?

    I've coded it so if Wrong=0 and Correct = n (let's say 8)

    So my code exactly is

    + System: Wrong = 0
    + System: Correct = 8
    ----+ System: Trigger once
    -----> System: Create object Apple on layer 0 at (random(106,638), random(11,283))
    

    I've done the 0 because in my past 'Help' project that was my question and it got solved (so thanks dop2000 and Maverick1912 ). Anyways fixing that a new problem arose (IKR?)

    When you get 8 correct so you'll have 2 instances of an apple. And you get 1 wrong an apple falls down. And you do the next question and then Uh oh! There's no apples! Why? That's my question to you. So it'll be really helpful if you can help me with this. Sorry, but because of restrictions I cant provide you with my project file (so pls don't ask) but I can give you Screenshots if that can help.

    Also here is my code for the apple to show ( I tried to fix the problem, but it didn't work, so that's why I'm asking you, and there's obviously something wrong with the code so if you could help, Awesome!

    + System: Correct = 8
    -> Apple: Set visibility Visible
    

    (It's simple, so even if it's wrong if its = 8 aan instance will show, but as u can see it didn't really help)

  • The problem here is you are using "=", the condition will be correct once when it = 8, and if with other value greater than 8, it stops the action whithin this condition.

    I suggest that you should use >= or <=.

    Cheers.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • The problem here is you are using "=", the condition will be correct once when it = 8, and if with other value greater than 8, it stops the action whithin this condition.

    I suggest that you should use >= or <=.

    Cheers.

    Yes,but if it is more than 8 won't it only do it once? eg: uestion correct

    Correct=9

    Apple is shown.

    Next

    Correct=10

    Apple wont show

    becaues it is only triggered once.

  • But with your way, you can't do this if it up to 1000, 10000....

    Add my Skype: DongNguyen602

    Maybe I could help you better than using this thread.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)