How do I Crouch

Get help using Construct 2

Post » Sun Jul 26, 2015 10:01 am

I'm sorry for the really lame question, but for some reason my brain just can't make sense of this.

Alright, I know how to crouch. I have the animation set up and everything. I even know how to make them crouch at the press of a button, basic stuff.

My question is, how do I force the player to stop moving when the down button is being held down.

Once the player lets go of the down button, they will stop crouching and be able to move around again.

I know this is really basic but for some reason I can't figure it out. Perhaps I'm overthinking it somehow.

Thanks in advance!
B
25
S
10
G
1
Posts: 154
Reputation: 2,687

Post » Sun Jul 26, 2015 10:07 am

If you are using custom controls for your movement you could add a condition to your key-presses..

On left arrow pressed
Down arrow is not down

or add an instance variable to your player that you set to "crouching" on down arrow down
and check for that in a condition:

On left arrow pressed
player instance variable is not "crouching"
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Sun Jul 26, 2015 10:38 am

I knew I was overthinking it. Thanks a lot!
B
25
S
10
G
1
Posts: 154
Reputation: 2,687


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 19 guests