How do I Reduce Character Polygon Collider while crouched

Get help using Construct 2

Post » Sat Aug 22, 2015 12:13 pm

hello,

while making a platformer, it may happen that the gameply require the player to crouch to avoid obstacles or go into smaller areas,

i have started with spriter to create some characters and now my problem is that i don't see any "set Height" parameter available .

so while debugging for now i get this result when the chracter is crouhing. wich is aboslutelly uselless ...

Image
B
16
S
3
Posts: 106
Reputation: 1,408

Post » Sat Aug 22, 2015 12:53 pm

Always use an invisible placeholder for collisions - then use events to change height and width properties.
B
59
S
21
G
9
Posts: 641
Reputation: 9,787

Post » Sat Aug 22, 2015 1:12 pm

Right, then you need events like:

If player is NOT holding down key AND there is no ceiling directly above the characters head, AND he is currently crouching, then play the standing up animation.

I use an overlap detection sprite pinned above the players head level while he's crouching to detect whether or not the player can stand up or not...IE, if the overlap detecting sprite is NOT overlapping a background obstacle, then let the player stand up, if not, keep him stuck in the crouched state.
B
49
S
9
G
4
Posts: 426
Reputation: 7,041

Post » Sat Aug 22, 2015 1:41 pm

Brashmonkey wrote:Right, then you need events like:

If player is NOT holding down key AND there is no ceiling directly above the characters head, AND he is currently crouching, then play the standing up animation.

I use an overlap detection sprite pinned above the players head level while he's crouching to detect whether or not the player can stand up or not...IE, if the overlap detecting sprite is NOT overlapping a background obstacle, then let the player stand up, if not, keep him stuck in the crouched state.

thanks sounds a very good idea
B
16
S
3
Posts: 106
Reputation: 1,408


Return to How do I....?

Who is online

Users browsing this forum: SashikLV, unxcellent and 7 guests