How do I .. make a building behave this way

Get help using Construct 2

Post » Thu Apr 30, 2015 1:48 am

A little background:
This is for a plat former war game, I am trying to draw most of it.. this is making it hard and slow.. I am not a great drawer.

I have drawn a small building and a stick figure, they both work in the level. I have a level layer and a background layer.

I can add the building to a level and add behavior solid to it. This way the player can jump on it, so thats great, that works.

But the player cant walk in front of the building.

I have tried making the building part of the background, adding jump through to it and none of it works. I am only able to jump on top of it.

any ideas?

thanks
B
8
S
2
Posts: 47
Reputation: 610

Post » Thu Apr 30, 2015 5:34 am

One quick method would be to edit the building sprites collision mesh in sprite editor and raise the bottom portion above height of player character. This would allow the player to walk in front of the building sprite but still collide with upper side and roof if jumping...

If you just want him to interact with roof then decrease the collision mesh to a rectangle that just fits the roof area and allow jump-through to keep it from looking odd if the player jumps from in front of building...
Check out my completed games on the Arcade! Capt. Doe Save the Universe! & Clicker Wizard!
B
66
S
17
G
8
Posts: 637
Reputation: 9,370

Post » Thu Apr 30, 2015 11:17 am

Thanks, that did it! almost. If I make the polygon outline the roof then it works very well. the only problem is I have stairs on the right to get to the roof. What is the best way to make them climbable, but able to walk by as well?

Right now I made it so they have a polygon shape that extends down to the top of the players head, so you can walk by, but you have to jump to get on the stairs. Is there a way to change the polygon when the player does a certain behavior?

thanks!
B
8
S
2
Posts: 47
Reputation: 610

Post » Thu Apr 30, 2015 8:22 pm

I created a little example .capx of my work around for solids, give it a look and see if it helps you any.

https://drive.google.com/open?id=0Bx-ufu2WID53WXZ2Sy0tYXFZWUk (click the download arrow in upper right corner of screen)

Note in my example I assume you want the stair use to be as seamless as possible so it doesn't require any input from player and simply triggers off their pushing up (aka jumping) when near foot of stair), it would be much simpler if you used a player driven toggle like a sign that said "Rickety stairs, press C to climb" and then toggled the stairs/ladder/elevator/crane on then.
Last edited by chrisinfinger on Mon Sep 05, 2016 10:41 pm, edited 2 times in total.
Check out my completed games on the Arcade! Capt. Doe Save the Universe! & Clicker Wizard!
B
66
S
17
G
8
Posts: 637
Reputation: 9,370

Post » Thu Apr 30, 2015 9:14 pm

I downloaded that capx, that makes sense! Thanks a bunch! I will have to split my stairs into a different object and then can set this up.

have a good one.
B
8
S
2
Posts: 47
Reputation: 610


Return to How do I....?

Who is online

Users browsing this forum: tarek2 and 28 guests