How do I trigger an event on overlap of 30% or more?

0 favourites
  • 2 posts
From the Asset Store
30 high-quality characters. This asset is perfect for a side scrolling game, or even a turn based RPG type game.
  • I'm designing a small game in which a ball moves on top of disappearing platforms. When a ball is on top of the platform and the platform disappears, I let the game trigger the following event:

    Player - is overlapping platform => Restart layout

    - Platform is invisible

    Problem is. The same event is triggered whenever even a single pixel "hits" the invisible platform. Is there any way I can restrict this behaviour to something akin to "30% is player is overlapping platform"?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Use overlap at offset. Only you set it in pixels

    In my example you have to set for both sides, so you cave to make 2 sets of conditions.

    one might be overlap 20,0 (20 is X and 0 is Y)

    The other would be -25,0

    This way the overlap works from both sides.

    I use this in a platformer of mine:

    Player > is Overlapping Enemy 25,0 > do something

    Player > is Overlapping Enemy -25,0 > do something

    In your case it sounds like you'll need change overlap for Y and in only one direction. Hope this helps.

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