R79.4 object clicked

  • Seems the trigger for on object clicked/ touched is being registered past its event.


    In the cap I used the touch object with use mouse enabled, but also tested with the mouse object, same result.

    Testing with the system wait resolved the issue.

    The expected behavior is one click add 1 to a gv, and then compare that gv for something else.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • What's the bug? It looks like you just add 1 to a global value, which instantly makes the next event true.

  • Right

    If you toggle the wait in event 5 to off you will see that the variable pick is added to from the next event, even though its conditions haven't been met. Basically you should have to click again in order for that event to happen.

    Somehow on click, or on touch, which should be like a trigger once, is being carried over.

  • Yeah, isn't this just because both triggers fire at once in top to bottom order?

    'pick' starts at 0

    Event 5 fires and sets 'pick' to 1

    The trigger continues firing down the event sheet, so then event 7 triggers, and 'pick' was just set to 1 so it runs, and sets 'pick' to 2

    So not a bug, just the order of your events?

  • Ok

    Yeah, order does change it up, but still the condition was not true at the time of the click.

    I can accept it as not a bug, since it has work a around, but somewhere a vulcan is now crying.

  • OK. Triggers have to trigger in some order, and they check their parent conditions at the moment they run, so it's just an order of events issue. Closing as by design.

  • also had the same problem, i had s sprite(1) which was supposed to transform into another sprite(2) when clicked and vice versa but when i click sprite(1) it transforms twice ie into sprite(2) and then back to sprite(1). i used click event but it was coming out as a double click or rather prolonged click.

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