JavaScript Stack Error on a Prototipe

0 favourites
  • 3 posts
  • 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.

  • I think if might be because of the amount of overlapping checks? Any Light on the subject?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 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.

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