Functions called multiple times in the same tick

0 favourites
From the Asset Store
An educational game for Times Table. An easy to use template for developers to build larger games
  • Ok, got it. So basically add "for each" everywhere.

    Jejeje lol, kind of but the way you say it it sounds really really scary jaja

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hi tarek2, Thanks for looking into this. I tried with your bug capx too and got the same result. Interestingly, if you check the timer tags in debug you can see that each sprite has a different tag ("change0","change1","change2") so it seems that the UID is being applied to the tag correctly.

    So the problem is that even if they have different tags if they finish on the same tick then "change"&self.UID still picks them all together, so the function Call "ChangeAnimation"(sprite.UID) will only fire for the first sprite in that group. Adding the "for each" to the function call (as suggested) fixes it, which renders the UID unnecessary.

    OK, I'm pretty sure that explains the issue I've been having - time to rewrite some code! Cheers again

  • Hi tarek2, Thanks for looking into this. I tried with your bug capx too and got the same result. Interestingly, if you check the timer tags in debug you can see that each sprite has a different tag ("change0","change1","change2") so it seems that the UID is being applied to the tag correctly.

    So the problem is that even if they have different tags if they finish on the same tick then "change"&self.UID still picks them all together, so the function Call "ChangeAnimation"(sprite.UID) will only fire for the first sprite in that group. Adding the "for each" to the function call (as suggested) fixes it, which renders the UID unnecessary.

    OK, I'm pretty sure that explains the issue I've been having - time to rewrite some code! Cheers again

    You Welcome mekonbekon

    Yeah the best thing is For each forever jaja

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