1 Key Input for 2 animations (stand-prone and prone-stand

Hi all,

I’m using Enum for player input and selection to change player states.
I have an issue where I want to press “X” on the keyboard so the player goes from Stand to Prone. - this works fine.
However, when i want to use the same “X” key to go from Prone to Stand, I can’t see a way to assign this to a different animation transition. - this is because the state I want to go to is just “IDLE/Move”

See below, the input action which is set up and also from the state machine, the ENUM set to allow the player to prone. However I don’t know how to reverse this.

Any tips?


anyone have any input here? it would be much appreciated

hi @enam1984

All you need to do is detect if youre actor is prone or not
then branch to the code to do the opposite

isProne > stand
notProne > prone

hey @High500 thanks for the input. I was avoiding using Bool Variables but i take it that’s what you’re mentioning here? I guess a few bools aren’t too bad.
Thanks.

how about GetPlayerState?

check what state it is

Would i declare this in State Machine Or AnimBP? Thanks

i would store the playerstate in whichever blueprint you are using to change the movement mode. you can just query it to allow you to change state or not

ah OK that’s the Character BP.
Thanks ill give that a go. Appreciate the prompt responses and help!

1 Like

I’m still confused :grimacing:

So I hit “X” and in the player state in 2nd Screenshot at the top of this thread, and my Player is in a prone state. (Stand to Prone)

However I still wanna use “X” to go from Prone to Stand

As per screenshot below - I want to add them both to the “Prone” Pose

Sorry I’m very new at this so im trying to understand best way of doing it

ok you need to have a variable in your character that stores the current pose.
this needs to be set everytime you change a pose (on your key presses)

So when you press X you want to check that variable

So say the variable is called currentPose

event X pressed > get currentPose > equals prone then stand, equals standing then prone.

you need to do this check when you press the X key
give me a little while let me mock something up

Ok ignore im using enhanced input, you use your normal input mappings as a start.

ive used a boolean to detect if character is prone or not. You could use a variable using your enum Playerstate

check the variable (you might use a compare node if you use your PlayerState) then perform the correct pose depending what the prone state is. make sure you set the variable each time to the new pose state as i have using the set node.

Thank you ill give it a try @High500 !! :slight_smile: