My son (7th grade) is learning Construct 3 by watching online tutorials. Recently he had a problem as described below:
- In the game, he spawns enemies every few seconds. A global variable is used tracking how many enemies are still alive.
- A bomb can kill multiple enemies (by subtracting 3 from enemy health) at the same time if the enemies are in the explosion zone.
- Once the enemies health reaches zero, the enemy count will subtract by 0.25
The problem we had is that if the bomb kills lots of enemies (>6) at the same time, the global counter either did not change at all or only decrease by 0.25. The enemies did get destroyed correctly. The game ended up with the counter showing there were still enemies, but actually all enemies have been killed on the screen. When there were only a few enemies (<4) that got killed, the counter decreased as expected.
Attached is a screen snapshot showing the enemy and bomb logic.