How do I stop my global variable from adding 1? [SOLVED]

0 favourites
  • 4 posts
From the Asset Store
Globals 2.0
$3.99 USD
Globals 2.0 stores and group variables. You can also load and save data (variables) from/to JSON files.
  • Hey Guys.

    Like my last topic

    My global variable is called 'Wrong'

    I have a code which is:

    Event

    When option C and

    Option E clicked.

    Action

    Player Do animation

    SubEvent

    Event

    Trigger Once

    Action

    Add 1 to wrong

    Event

    SYSTEM-Wrong= or more than 1

    Action

    Show wrong (sprite)

    In this game, there are multiple answer choices and questions.

    At first, it didn't work, but

    then I checked the debugging and I saw that my code of 'add 1 to wrong'

    added 1 all the time even though I added a trigger once How do I stop this?

    To be more clear I have added my coding.

    This is my 1st code

    And my 2nd Code

    Edit here is my debugging

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

  • 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

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

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