[SOLVED] How do I check if an object is 'on' another object?

0 favourites
  • 5 posts
From the Asset Store
Hand-painted tiles, objects, animated objects, and background to build a colorful Mayan civilization environment.
  • I have a platformer game where barriers move from right to left until off the screen. The player object which you can control moves from right to left too unless you are moving the player right to prevent from going off the screen. Whenever my player object lands on the barriers, it's speed left is doubled so that he slides off the barrier then lands on the 'ground' and returns to a normal speed going left.

    Here is my event's for further verification as well as a crappy gif.

    My question is, how do I check if the player object is on the barrier object, which each time it is generated is at a different height, so that I can set the object speed to the the right to negate the double speed caused by the barrier.

    As well, if you have any suggestions for better doing things in how I update the player movement, don't

    hesitate to let me know.

    Click the link, the screenshot is really big, forgot to resize it.

    i.imgur.com/xEs7eeo.png

  • Look into the platform behavior "on landed"

    https://www.scirra.com/manual/100/platform

  • Is there any way to detect which object I "on landed" or is it just uniform for all objects.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You can use "Is overlapping at offset" to check for an overlap below the player.

  • You can use "Is overlapping at offset" to check for an overlap below the player.

    Thanks, that got it to work. I expanded the Y coordinate down a little. I thought I tried that but apparently not. Appreciate the help!

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