Bug : particule overspawn [SOLVED]

0 favourites
From the Asset Store
Match same tiles with each other as fast as you can and earn more score during a limited time!
  • It happens on collison with 'Piques'.

    And because you have multiple 'Piques' crowed on a dense place, Perso (player) is colliding with more then one spike in a very short time.

    Each collission triggers a call to the 'mort' function.

    In short: for each spike it collides with (almost at the same time) it makes a new player. And it multiplies because you are getting more and more players.

    Lose all the 'trigger once' for now.

    Give Perso an instance boolean 'IamDeadAllreadyDontBother' (something like that, but in your language) .. false

    (In one event, 2 condtions)

    On Perso collission with Piques

    Perso boolean 'IamDeadAllreadyDontBother' is set ? (inverted, so if not set)


    set boolean 'IamDeadAllreadyDontBother' to true

    call mort

    In the the function "SpawnPerso" add the actions

    Wait 0.5

    set boolean 'IamDeadAllreadyDontBother' to false

    I think that should do it .. code wise.

    But, at the same time i think you better make a spike-sprite with animations for the colors, and frames for the amount of spikes (watch the collission polygones). Those spikes you bring in the layout (not even on runtime) only once anyway, so that should not be that much of work. Set default animation and frame in the instance properties in the layout editor.

    Alternative. Those two suggestions are ways to avoid the problem.

    Bur After all, your solution (fixing it after the facts the way you did) is also not that bad. Is does not harm and is not messing up code. So in fact, you solved it allready, and i understand the cause, every one happy.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thank you !

    Thank for your quick answer

    I don't think i change frame with number of spike cause if i have a line of 42 spikes i won't make 42 frame * 10 (for all color)

    Thank again, great forum with actif people

    May i have to mark it as solved ? i don't see any button ?

  • You can edit the title of the first post and add [SOLVED]. Most dont bother.

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