How do I fix a stacking error?

0 favourites
  • 3 posts
From the Asset Store
Use this game pack to create your own game, modify the existing game or simply take a look and see how it was made.
  • Hey everyone!

    I keep getting a stacking error message when one of my monsters dies.

    What should happen is when my bullets (Medium or Large Shot) collide with the BeadSnake mob, it plays its death animation, and gets destroyed when that animation finishes.

    For some reason whenever it destroys, I get an error message that I'm not knowledgeable enough to fix. I tried rearranging my events and actions three times, and I'm having trouble figuring out what's going wrong.

    Here's a screenshot of my events, and the error message I get when the BeadSnake gets destroyed:

    Can someone explain to me what I'm doing wrong here and how to prevent this in the future?

    Thank you!!


  • It says in the error message - you have triggers(collisions, on animation finished) as subevents to a loop(for each BeadSnake), which isn't allowed. The green arrow to the left of a condition indicates that the condition is a trigger -- something that's true for one frame when a state is attained and is then false until the state is reversed and once again attained, more or less. Construct 2 treats triggers differently from regular conditions.

    Your use of explicit for each loops here is unnecessary, as all of these conditions will implicitly run against all instances of BeadSnake/bead. Getting rid of them -- although the first one would be the only one causing the error -- should get rid of your problem and still result in everything working the way you'd expect.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Ah! Thank you!

    I never realized that the arrows indicated triggers. I'm learning how to use construct through experimentation and google-fu, so I really appreciate you spelling it out for me like that. Makes it easy to understand.


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