0 Favourites

How do I fix a stacking error?

  • 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!!

    -Scott

  • Construct 3

    Buy Construct 3

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

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

  • 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.

    Thanks!!

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)
Similar Topics Posts Views Last Post
Unread hot topic
175 32,639
clifton11221's avatar
clifton11221
Unread hot topic
99 10,139
karshinkoff's avatar
karshinkoff
Unread hot topic
98 7,597
norum82's avatar
norum82