How to compare the name and values ​​of an object that collide with the player?

0 favourites
  • 5 posts
From the Asset Store
Basic Rounded Vector Geometry Player Design with Glow for 3 player games
  • I need to identify the name and value of a variable when an object collides with the event object.

    The event object when colliding with something needs to know the name and state of the collided object.

  • When you say ObjectA on collision with ObjectB, both the instances are picked so you can use them however you want. If you set text to ObjectA.var or ObjectB.var then it will pick those that collided.

  • But in that case I would have to question whether object A is touching object.

    But if we have several objects, from A to Z, and object A touches any one of them, object A is unable to say the name of the object that is colliding. Furthermore, it is impossible for object A to access information from a variable of the object that collided with it.

  • You can put all objects in a family and use the condition to detect colliding with family object. To find the 'name' of an object no you can't but why would you need that? You can use UID to identify a specific instance if you want or you can grab variable values.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I'm going to study about the UID and see if it solves the case. Thanks!

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