Distance Object created : How to measure the same object created.

0 favourites
  • 3 posts
From the Asset Store
This is a single chapter from the "Construct Starter Kit Collection". It is the Student Workbook for its Workshop.
  • Hello there, I would like to ask about how to measure between 2 object with the same sprite.In general we can log/print or measure the distance between 2 object with different sprite (ex: sprite1 for player and sprite2 for ground) we can use floor(distance(player.x,player.y,ground.x,ground.y) but how to measure between same sprites?

    ex: player has reached ground, then new ground sprite created again. How to measure between first ground and second ground.

    Thanks.

  • I think you mean objects, not sprites.

    I mean, you want to know how to measure the distance between two sprite objects that are the same type.

    The objects need to be able to distinguish one from another, for this a variable called "nameObject" is used, one object is named as "A" and the other object as "B"

    There is probably another method but right now I can't think of

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You can always use the objects UIDs.

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