How do I ignore instances in a container

0 favourites
  • 1 posts
  • Hey.

    I need instances of the same object to be able to attack each other. The game is a 45 degree top down view. To allow instances to walk over walls to show this I have the objects hit box set to there feet. And made a second object called "AttackBox" and pinned it inside a container. Then used this code to see if there was a hit.

    https://www.dropbox.com/s/fgm9dx154vjs2xf/Capture.PNG?dl=0

    This worked only if two objects were overlapping. I figured that was because the parent condition was "overlapping" and not "on collision" However I could not use "on collision" because the AttackBox item only showed the range of attack. not if one was done.

    To fix this I made another object called "fist" (because you punch) and added it to the container as well. then changed the parent condition to "fist" on collision with "AttackBox" and moved the Kill function inside the parent and disabled the rest.

    Thing is... you punch yourself now. because the players fist in the sprite is inside it's own AttackBox. it always lands a hit on itself.

    how do I not only know if an object is punching, but to find what AttackBox object it hit that's not it's own.

    Thanks

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)