How do I Fall between blocks

0 favourites
From the Asset Store
Be careful and guide your animal safely to the grounds.
  • Hey peps, apparently the platform behaviour seems to allow running up slopes or something? Anyway, I need to turn that off or make a way to fall through gaps.

    [attachment=0:3vau3cwx][/attachment:3vau3cwx]

    I tried reducing the players speed hoping that would work but it didn't. It's pretty ridiculous since the gap is 16 pixels wide, and I keep reducing the playerbox (an invisible sprite to handle collisions for the player) down to 10 pixels but he still won't fall down if he runs over it.

    Is the gap too small? Is it due to the behaviour? Engine? Little help?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • The built-in Platform behavior has a lot of idiosyncracies. I'd suggest making the gap a little wider. Mabe add a tiny portion of tile- 4x16? That looks the same as the existing tiled background, but doesn't have the solid behavior.

  • Unnatural20

    If I made a custom control system using the custom movement behaviour, do you think it would fix it?

  • Ashley

    Does the platformer behaviour have a feature that "auto-climbs" small elevations?

    If so, could that be causing this? If so, can you include an option to turn it off in the next build?

  • are you using tilemap if yes than check block you are talking about is not solid.

  • are you using tilemap if yes than check block you are talking about is not solid.

    Yes I'm using tilemap. Also wouldn't disabling its solid property make all the blocks that are the same in the layout also make then unsolid?

  • Are you using a controller invisible sprite?

  • The platform behavior isn't exactly suitable for low res pixel perfect games like that. The use of floating point positions makes it nearly impossible to drop into a gap just as wide as the player. So the first solution is to make the player's width a little smaller. Then next issue is how the platform behavior handles collisions. What it does is move the sprite and if it's overlapping any solids it then moves out of the solids in the closest direction. The side effect is the "auto-climbs" as you call it, and it's what enables the player to move up slopes.

    One possible solution is to detect when you're walking over a hole and put a decoy wall at the other side of it for the player to hit and drop in.

  • Are you using a controller invisible sprite?

    Yes, currently it's 12 pixels wide. The gap is 16 pixels wide.

    The platform behavior isn't exactly suitable for low res pixel perfect games like that. The use of floating point positions makes it nearly impossible to drop into a gap just as wide as the player. So the first solution is to make the player's width a little smaller. Then next issue is how the platform behavior handles collisions. What it does is move the sprite and if it's overlapping any solids it then moves out of the solids in the closest direction. The side effect is the "auto-climbs" as you call it, and it's what enables the player to move up slopes.

    One possible solution is to detect when you're walking over a hole and put a decoy wall at the other side of it for the player to hit and drop in.

    The player's collision box, which is a separate invisible sprite, is 12px wide, the gap is 16px.

  • R0J0hound

    Does anyone have a plugin similar to the Platformer behaviour without the slope detection? Or is there a way to use the SDK to make another behaviour? I want the player to move the same way Samus does in Metroid, I'd never have thought Construct 2 wouldn't have something as basic as disabling slope detection. Ah well.

    EDIT: Nearly forgot, thanks for the .capx!!!

  • Looks like your Characters Collision Area(Bounding box) is larger i pixel size that the actual gap. This is making him runover the gap withiut falling inside. Either Increase the gap between the blocks or reduce the character's Collision box.

    Or Check if any other sprite attached to your Character has a bounding box thats set to solid and is bigger in width than the gap

  • Looks like your Characters Collision Area(Bounding box) is larger i pixel size that the actual gap. This is making him runover the gap withiut falling inside. Either Increase the gap between the blocks or reduce the character's Collision box.

    Or Check if any other sprite attached to your Character has a bounding box thats set to solid and is bigger in width than the gap

    You should read the older posts.

  • The platform behavior isn't exactly suitable for low res pixel perfect games like that. The use of floating point positions makes it nearly impossible to drop into a gap just as wide as the player. So the first solution is to make the player's width a little smaller. Then next issue is how the platform behavior handles collisions. What it does is move the sprite and if it's overlapping any solids it then moves out of the solids in the closest direction. The side effect is the "auto-climbs" as you call it, and it's what enables the player to move up slopes.

    One possible solution is to detect when you're walking over a hole and put a decoy wall at the other side of it for the player to hit and drop in.

    I'm having trouble reusing you events in my game, the tilemaps blocks are 8x8 used to make 16x16 tiles, the character is 12x32 but could be 16x32. I tried it a few ways but it always ends up spawning off the edge blocking the player from falling or too far from the edge doing nothing.

    EDIT:I got it working with a 8x8 sprite, but it doesn't stop the player.

  • Also, it's making my character get stuck, when there's a ledge and a wall directly next to it. Might just have to make the gaps twice as wide.

  • Earlier I mentioned widening the gap, but not to the full two-spaces wide. Well, here's my prototype of that, using a tilemap.

    You can still run over the gap, but it's a lot easier to drop into.

    Blue box controls with arrow keys. It's a little shorter and a little narrower than green box, which controls with WASD (well, except no S)

    Green box cannot fit through *any* gaps.

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