Page 1 of 1

How do I Crouch

PostPosted: Sun Jul 26, 2015 10:01 am
by ChaoticShadow24
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!

Re: How do I Crouch

PostPosted: Sun Jul 26, 2015 10:07 am
by LittleStain
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"

Re: How do I Crouch

PostPosted: Sun Jul 26, 2015 10:38 am
by ChaoticShadow24
I knew I was overthinking it. Thanks a lot!