Select Collision Instances?

  • Hi,

    I am trying to select both colliding instances of a single object.

    The first question is: how do I check multiple instances of ONE object against each others collision?

    And at least, how can I access both involved instances (IID / UID)?

    Many thanks :)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • This example was made for another question, but it shows you how you can get a hold of the instances if they are of the same type.

    .capx

    You can also do this:

    +Sprite1: On collision with Sprite1

       +System: Pick Sprite1 instance 0

          -> do something

       +System: Pick Sprite1 instance 1

          -> do something

    But here you have to know how many instances collide, or you could use it if you just want to pick one of them.

  • Thanks for your suggestion.

    Sprite1: On collision with Sprite1

       +System: Pick Sprite1 instance 0

          -> do something

       +System: Pick Sprite1 instance 1

          -> do something

    Thats how I made it first, but it won't work. I am testing if the correct instances are selected to let them stop movement, but only one of them stops.

    I also dont understand how this should work, since I guess the IID / UID does not change when checking for the collision to the other. Maybe someone could explain me what exactly happens in this condition

    "Sprite1: On collision with Sprite1"

    Many thanks <img src="smileys/smiley1.gif" border="0" align="middle" />

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