So i'm making this prototipe of a game where you spawn troops to try and destroy the enemy's turret and you get some enemys spawning from the other side, i'm using
rectangles to check if the enemy is overlaping it so it takes damage.
But for some reason that i cant figure out i'm getting an stack error from java script.
Here is my event sheet:
Sorry can't post with links I'm very new to the construct engine and comunity.
Develop games in your browser. Powerful, performant & highly capable.
I think if might be because of the amount of overlapping checks? Any Light on the subject?
You made a neverending 'on create' loop.
When you have a bunch of objects in the layout, they count as 'just created' when running that layout.
So, the 'on create' events you made, they create a new object for each object in the layout, and then kicks in again on those newly created ones. Result: a neverending loop.
Solution: Destroy them in the 'on start of layout'
And use containers to pair sprites with theire helper sprites.