Problem with Death Counter

This forum is currently in read-only mode.
From the Asset Store
Make a displayed number gradually increase or decrease, making an impression of a real-time counting.
  • Hey all,

    I have a death counting system, which is meant to trigger the next wave after so many enemy deaths. However, if multiple enemies die at the same time, the trigger only goes up once, instead of once for each enemy that dies. Is there a way to make it go up for each enemy death?

    Thanks

  • Yes, you'll need to add or substract from a value every time an enemy dies, but for that I'd need to see the .cap or part of the code, where an enemy dies. How you've done it? On collision with something?

    Enemy collides with a bullet - destroy enemy, add one to a global "enemiesdead"

    enemiesdead = 100 - start new wave, enemiesdead set to 0

    I'd do something like that, but without seeing your code, it's just guessing.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Sometimes if a condition is satisfied by multiple objects at once, it will only be triggered once, depending on the type of condition or which object plays which role, ie

    On Enemy collides with Bullet

    Or

    On Bullet Collides with Enemy

    I think one of those two will work the way you want it to. Don't know for sure without testing tho.

    A surefiire way though, is as a subevent for the condition that kills the enemy do a For Each Object

    On Enemy collides with Bullet

    ----System - For each object : Enemy

    -----------------destroy, and increment death count

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