I'm pretty new in the use of Construct2 and in gamemaking in general. I'm just trying to grasp the basics first.
So my problem is, I pinned two objects together. The object on top is like an armor that opens and closes and cannot be destroyed. The object below that has a health instance variable. I already set it up so that when the bottom object gets destroyed, the armor gets destroyed too. It works fine.
But when I made copies, things turned bad. When I destroy Object 2, all instances of object 1 (armor) gets destroyed. How do I fix this?
Also, I set those objects to get destroyed outside of the layer. When they were multiplied, whenever the first pair gets destroyed, the other pairs lose their pins and the armor leaves the bottom object.
I hope you could help me with this one. Thanks!
Develop games in your browser. Powerful, performant & highly capable.
You should check the item before destroying it, otherwise, any of that item will be destroyed, because you said it, destroy all items of that type, while not giving the system a path to select the right item.
If you want avoid it, try checking what item was hit and pick it in the event.
Something like this:
Sample CAPX: https://dl.dropboxusercontent.com/u/470 ... ullet.capx
After picking the correctly object, you can make one less step by working in another way.
Making a container. It's smart because everything inside the container will be destroyed, so, any armor or weapon spawned by that object will be destroyed with him.