Double Clicking Faster than Event can Stop

0 favourites
  • 5 posts
From the Asset Store
14 amazing sound files of game events like Level Ups, Level Completes, object spawn, object taking etc.
  • Hello! I’m working on a recreation of Jeopardy for teachers to use in their classroom, and I’ve run into a snag.

    If you tap fast enough on one square and then another, both events trigger and both Jeopardy questions zoom in. This is despite the first tap changing a variable to “gate” the second click from working. I’ve tried all sorts of things, but it all seems to come down to me being able to click faster than the variable can update.

    Apologies for the messy code, (I’m an instructional designer for school materials, not a programmer) but this is where we currently stand:

    Here is a link to my project file: drive.google.com/file/d/1P1grtZwRaruLPTTs6IMroGfgBHulNm_Y/view

    Steps to recreate:

    1. Test layout 2.

    2. Click the top left Jeopardy square.

    3. Immediately click the square below it.

    4. Click twice more to get through the answer/question.

    5. Click the glowing team icons at the top to assign points.

    6. Notice that the points assigned are from the second click’s square. (Suffer.)

    Any ideas on how to fix this? Thank you in advance!

    Tagged:

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Oh---Noting here that you can't actually see the points without my linked spreadsheet, whoops! Another way to tell something is amiss is that the second box will no longer be clickable due to the fact that it got sent to the same location as the first box at the end of the questions/answers (because it was being triggered at the same time).

  • Guessing you mean the question active variable, when you tap and set it from 0 to 1 it means within the same tap the next event can run because you made it true by setting it to 1. Not sure of the reason for the variable but that's probably why it lets you click the next panel. Consider using a general lock out variable that swaps only between 2 values to lock out the tapping.

  • Thank you for your response! I probably included too much code in my snippet, but---I'm actually struggling with the clicks in relation to BackgroundAA versus BackgroundAB. Clicking on BackgroundAA should send the variable QuestionActive to 100 (followed by 1 or 2), hypothetically locking out clicks on BackgroundAB (which must have QuestionActive = 0 to fire), but if you're fast enough, you can click BackgroundAB and double-fire events. I'm definitely not fast enough to click on the same tick. So I'm a little lost as to why I can do this. If you have time, I'd love your further insight!

  • It's what I described above, you are setting the variable to 1 or 2 instantly, not 100. So then you can click on the background again with the variable set to 1 or 2 which triggers those conditions. You should use a different variable for locking out clicks, not the same variable that you are changing for the questions - this will be an additional condition, so QuestionActive=? and also CanClick=? which you toggle on and off.

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