To make the player crouch

Get help using Construct 2

Post » Sat Apr 27, 2013 7:09 pm

Hello all,


I'm working on making my 2D player have a duck/crouching ability. I have created two function the first one "when down key is down" and "PlayerMask is on floor". I do not know how to set the size for my PlayerMask without him phasing into the ground while attempting to duck. Plus the crouch animation tends to loop while holding the down key. I tried searching the forums as well to see if anyone has asked this question before (because embarrassing enough it seems so simple) but all I found was how to make crouching in Construct Classic only... Please Help.    
B
4
Posts: 35
Reputation: 445

Post » Sat Apr 27, 2013 8:28 pm

you should set the animation to set when :
Key Pressed: Down (instead of Key is down)

To set the collision mask, you use the Sprite editor included in Construct 2, but I think the problem is the origin of your Sprite, for a platforming game, it's better to set it at the feet of the player, so if his/her tall increase or decrease, it will evolve upper instead of all around of the player
https://www.scirra.com/forum/viewtopic.php?t=152506

And that is why you shall respect the bug reports guidelines, not only giving a capx is making the bug reproductible in one click in a situation they can work with (less time wasted trying to reproduce vague instructions) but also it helps filtering false positives.

Game design is all about decomposing the core of your game so it becomes simple instructions.
B
42
S
17
G
16
Posts: 2,094
Reputation: 15,355

Post » Tue Apr 30, 2013 3:35 am

Thank you Aphrodite!

By the way I love your Monster World IV Profile Pic of Asha Love that game!
B
4
Posts: 35
Reputation: 445

Post » Tue Apr 30, 2013 3:57 am

Edit: Sorry, I misread your post. Have you tried adding a "once while true" to your key event?

Like this:

andreyin2013-04-30 03:59:51
B
106
S
35
G
37
Posts: 796
Reputation: 25,211


Return to How do I....?

Who is online

Users browsing this forum: R0J0hound, Yahoo [Bot] and 27 guests