How do I choose and object when colliding with itself?

Not favoritedFavorited Favorited 0 favourites
  • 2 posts
From the Asset Store
Hand-painted tiles, objects, animated objects, and background to build a colorful Mayan civilization environment.
  • I have situation like this.

    1) How do I pick the object that is colliding?

    2) How do I pick the object that is collided into?

    3) What happens when both objects are colliding into each other, how do I choose objects then?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hi. Collision with itself used to be a weakness of Construct3. So we used to add an object to a family and check collision with the family.

    But I don't remember when these two conditions were added and they made my life a lot easier.

    Pick Nth instance

    Pick the instance at a given place in the internal list of picked objects. This is most useful used in sub-events to act on separate instances. For example, in a "Sprite collided with Sprite" event, Pick 0th instance and Pick 1st instance can be used to act on each instance involved in the collision separately.

    If all objects are currently picked, this condition can also be used to pick an object by its index ID (IID).

    Pick random instance

    Pick a random instance from the currently picked objects. In other words, if Pick random instance follows another condition, it will pick a random instance from the instances meeting the prior condition. Otherwise it picks a random instance from all the instances.

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