Yeah, I noticed that in next game the enemies start with 0 health. I'll see if I can crush this bug...
Updated: Okay, I've balanced the game some more, turrets shouldn't get crazy benefits now, they'll be more streamlined. Their costs have been streamlined as well, shouldn't rise so sharply anymore.
Updated Grid Defense
However, this bug... When the game ends with your loss, it is paused, then you press enter, that is when it resets everything - delete all game objects but the static ones, reset global variables (Wave to 0).
When you start the game again, it should be as it has been at the beginning. However, bugs have this amount of health:
4.94065645841247e-323
Looking into the event sheet, this is how the health is assigned (at time of spawn):
Spawn object Enemy on layer "Game"
Set Enemy 'Level' to global('Wave')
Set Enemy 'Health' to Enemy ('Value')*global('Wave')^1.1
In Debug, I observed this:
The global 'Wave' is fine, it correctly increments with each wave.
The Enemy 'Value' is fine as well, it never changed from the initial value.
So it should be (for value of 5, first wave=1): 5 * 1^1.1=5
But the health we observe is near zero.
The event obviously is firing, as the enemies are spawning, but the health is set incorrectly.
This bug is a serious one, I can't figure out why is it happening other than some quirk in the engine or runtime. I am afraid I am stumped here.