How do I destroy a single instance on collision

0 favourites
  • 8 posts
  • Hello there, I am new to Contruct. I used to use Stencyl, and the logics behind both of them are very different. So I am having a bit of hard time for simple things sometimes. Please don't judge.

    My problem was so simple that I'm helpless. It fits within this little image:

    I simply want the "portablestuff" instance to be destroyed. I don't understand why it does not pick the instance that the obkect collided with.

    PortableStuff is an object that is spawned then pined by an other object. This event is not a subEvent.

    I guess I coud find some work around with some instance variable, but since I'm am learning how Construct works, I would like to understand why this line is not working.

    I've looked upon the forum, but each time the problem was different, and not related to mine. So what am I doing wrong ?

  • Do it the other way around.

    portablestuff on collision with queen portablestuff Destroy

  • that's odd it should work. have you checked its collision points? you should also check that collisions are enabled and that you dont have conflicting event.

    i even made a example project to show that it should work the way you have it https://dl.dropboxusercontent.com/u/512 ... lopix.capx

    just use arrow keys to move

    and spongehammer it should work this way(and flipped as you said)

  • SpongeHammer> I tried the other way around, but it is still the same.

    Thank you Volkiller, but it seems that I cannot open your project (it says my version is too old but it is release 200, isn't it the latest one ? )

    The project is not very big, I checked all events but this is the only one with "portablestuff" in the conditions.

    All the event with portablestuff are: spawn, pin, and on collision.

    I checked the collision points, but I found nothing unusual with them.

    This is what is happening: everything is working as it should, but once one of the portablestfuff instances touches the object queen, every instance of portable stuff is destroyed.

    Is it possible that it might be a bug?

    I had very strange things happening with an else event that was not working properly with the same project.

    I can provide a link to the project if you want.

  • I managed to open your file Volkiller. Thanks.

    But indeed, this is exactly what I am doing.

    Here is the complete project if someone want to have a look.

    Edit: oops it seems that I am not able to publish links for the moment...

    nacht. free. fr/test/Antz/test.capx just remove the spaces

  • There is an action within larva..

    On pathfinding arrived - portablestuff destroy

    This event does not pick an instance of prtable stuff and as such destroys all portablestuff instances.

  • Wow thank you so much, that's something from previous tests I forgot to delete !

    Thanks! Give that man another medal !

    I'm sorry that this was all my fault, and since I don't know the software so much I thought I was just using it wrong.

    So if you saw something in the code that was not the proper way of doing it please let me know !

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Glad to be able to help!

    This is the exact reason why so often is asked to include the capx.

    Conflicting actions/events can be easily overlooked.

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