How do I destroy an instance of an object

0 favourites
  • 7 posts
From the Asset Store
Welcome! I-Spy (Hidden objects) is an educational puzzle that is more than just seek-and-find activities.
  • Hey,

    I have an object sprite that is repeated more than twice.

    How can I destroy a specific instance of that object when an event happens?

    Right now I can only make it destroy the object, removing all of them.

    I want it to destroy a specific instance of the object.

    Can this be done with UID?

    Please enlighten me!

    Thanks!

  • you have to pick the instance in the event which controls the destroying.

    If you don't tell Construct2 which instance you mean it will perform the actions on all instances.

    There are a number of ways to do the picking.

    If you are comparing an instance variable, usually a system for each event will solve your problems.

    you could also just put the check as a subevent of the event where the instance variable is changed, for the right instance should already be picked in that event.

  • The issues would be found how you have set up your Events to flow...

    Please post your Capx or event sheet screenshot so we can see whats going on and address the specific problem....What you explained doesn't seem to follow standard instance behaviour in Construct 2

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • dl.dropboxusercontent.com/u/84259828/example.capx

    There is a capx link to a very basic scenario of what I want.

    Instead of the block the ball is hitting breaking, how can I make it so one of the blocks to the right destroy instead?

    If you want to just edit the capx and re-upload it that's fine!

    Or you can just explain here!

    Thanks!

  • Anyone know the solution to this?

    I provided a .capx for you in the post above.

    Thanks!

  • Umm, I just downloaded the .capx and it seems to be working as you want it to.

    Your events are also correct.

  • Tekniko

    Hey, sorry for any confusion

    But I want the following to happen:

    Instead of the block the ball is hitting breaking, how can I make it so one of the blocks to the right destroy instead?

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