Sprite not detecting overlapping?

0 favourites
  • 8 posts
From the Asset Store
2D fighting template based in the game that defined the fighting games genre.
  • I want this sprite's opacity to be turned down to 50% if it is touching the border sprite. But it isn't detecting overlap between the two sprites, and the events aren't triggered.

    If I change the event to on collision with object, it does work, but the sprite will not go back to 100% opacity after the collision.

    Both sprites have collisions enabled. Border is a solid object. Player2 has the follow and 8direction behaviors applied to it, because I have it following the player sprite around.

    I am able to get the effect I want if I recreate the same event with a different sprite. So I don't know why it isn't working.

    I'd appreciate any help. Thank you.

  • I don't think you can overlap a solid object you can only collide into it, though it is strange how the 'not colliding' event doesn't revert the opacity to 100, unless you have other events that control opacity? Can we see a screenshot of what you did with collision ?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • lionz

    I don't have any other events that control opacity. Here's what I have for the collision event.

  • The 8-direction behavior prevents you from overlapping solid objects. Therefore, it will not work directly.

    You can attach an invisible sprite with a sensor that is a few pixels larger than the character, and it will work.

  • lionz

    I don't have any other events that control opacity. Here's what I have for the collision event.

    And for the opposite to set it back to 100 ?

    Can you explain the gameplay of the game and what the border is ? Maybe there is a better way to achieve what you want.

  • The 8-direction behavior prevents you from overlapping solid objects. Therefore, it will not work directly.

    You can attach an invisible sprite with a sensor that is a few pixels larger than the character, and it will work.

    This worked! Thank you so much.

  • Hello, lionz

    Are you the one who always negatively evaluated my posts? I noticed a long time ago in which topics we answer together, I always get a minus in karma. Do you have a problem with this?

  • Hello, lionz

    Are you the one who always negatively evaluated my posts? I noticed a long time ago in which topics we answer together, I always get a minus in karma. Do you have a problem with this?

    I gave you a thumbs up, because this was funny LOL

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