How do I detect if an object is within a pos?

Not favoritedFavorited Favorited 0 favourites
  • 3 posts
From the Asset Store
Hand-painted tiles, objects, animated objects, and background to build a colorful Mayan civilization environment.
  • I am trying to make a generation system kinda similar to Binding of Isaac, and I am trying to detect if any instance of the "wall" object is within a a set distance of another instance of the "wall" object. can i do that with event sheets? if i can, then how?

  • You probably could try

    IF Object.X == Wall.X+(how far away you would want it to detect)

    edit - or of course you could try it with Y or both , XY

    edit -

    i also forgot to mention:

    if the Wall is in the center and the Object is on the right you would use(+)

    IF Object.X == Wall.X+(how far away you would want it to detect)

    and if the Object is on the left you would use (-):

    IF Object.X == Wall.X-(how far away you would want it to detect)

    and if the wall is in the center and the Object is above you would use(+):

    IF Object.Y == Wall.Y+(how far away you would want it to detect)

    and if the Object is beneath the wall you would use (-):

    IF Object.Y == Wall.Y-(how far away you would want it to detect)

    i hope this is what you want to find out about

    Radkampfwagen

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • thank you! I tried it and it's working so far! I am going to tweak it to work perfectly, but this is what I needed!

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