How do I destroy a specific instance?

  • So, forgive me for asking but I could not quite find the right answer after searching the forums and the manual.

    So, this is what I'm trying to do.

    I'm spawning a bunch of squares that move upwards. When they collide, they are destroyed and do a set of things.

    • Award Points
    • Spawn another Sprite
    • Trigger the "Flash" for said sprite
    • Increase Combo Meter

    My problem lies first with the fact that the sprite flash and destruction for the new sprite affect all incoming instances.

    Secondly, I've pinned another sprite to this square. Every time a square is spawned, the second sprite or "Skin" is spawned accordingly. What I aiming to do, like the situation with the flash is when a specific block is destroyed, the "skin" that is pinned to it, is also destroyed.

    Instead,however, when one block is destroyed, all of the instances of the skin are destroyed. This is not true of the initial block that collided.

    I hope i was able to explain myself alright. Thank you for taking the time to look and as well for any reply.

    Tagged:

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Add skin and square to the same container. Each skin will be created and destroyed automatically with its own square.

    construct.net/en/make-games/manuals/construct-3/project-primitives/objects/containers

    As for your first issue, you are doing something wrong. When you create a sprite instance, it's picked in this event. So if you need it to Flash or apply some other effects, you need to do in the same event or sub-events. If this doesn't help, please post your code or project.

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