How do I make player not to fall through

Get help using Construct 2

Post » Thu Jul 23, 2015 6:26 am

Hi,
I'm developing an android game, in which I created a tree with branches. The player should climb on to the tree by jumping on to its branches. When the player go to the edge of the branch, he is falling down through the branch. And also sometimes the player is going up the tree when he is moving towards the edge of the branch.

Behaviors Used,
Player - Platform
Branches - JumpThru
Tree - Solid

How to rectify this error? Please help.
B
24
S
7
Posts: 337
Reputation: 2,224

Post » Thu Jul 23, 2015 7:19 am

branch jump through + solid two behavior
B
4
Posts: 1
Reputation: 209

Post » Thu Jul 23, 2015 7:33 am

Is the Tree the Background of the game? than he donot need the Behaviors.
B
20
S
2
G
1
Posts: 19
Reputation: 1,004

Post » Thu Jul 23, 2015 8:23 am

No, it isn't. Tree is a sprite. Player will be standing on ground between two trees. He should jump from one branch of a tree to another. I added solid behavior to the tree inorder to make sure that player will not go off the screen. @zim
B
24
S
7
Posts: 337
Reputation: 2,224

Post » Thu Jul 23, 2015 8:25 am

Yes, I tried that too but the player is able to jumpthru the branch if the add solid behavior to it. @Fright Bamboo.
B
24
S
7
Posts: 337
Reputation: 2,224

Post » Thu Jul 23, 2015 11:12 am

Do you edit the "Set collision polygon" in the sprite Image?
B
20
S
2
G
1
Posts: 19
Reputation: 1,004

Post » Thu Jul 23, 2015 3:57 pm

First give the branch solid and jumpthru behaviors.
Then, let the branch decide whether its jumpthru or solid behaviors are active.
If the branch is above the player, then set jumpthru to enabled, solid to disabled.
If the branch is below the player, then set jumpthru to disabled, solid to enabled.

I hope this is what you were looking for.

www (dot) dropbox (dot) com/s/ymdigrg2cqzizmh/Tree%20Jump%20Platform.capx?dl=0
B
5
S
1
Posts: 23
Reputation: 426

Post » Thu Jul 23, 2015 7:35 pm

@DurandalCorp Thanks alot man, it's working. You are awesome.
B
24
S
7
Posts: 337
Reputation: 2,224


Return to How do I....?

Who is online

Users browsing this forum: brunopalermo, Microbex, totoe and 18 guests