Run and Crouch Animation

://im88.gulfup/W1YXT0.png

What I want exactly is this (my keyboard is AZERTY):

*When I press ‘Z’ the character start walking (the Idle_Walk Blend). That’s working fine :slight_smile: .

*When I press ‘Space Bar’ the character jumps (a single animation for the jump). That’s also working fine :slight_smile: .

*When I press ‘Shift’ The Character start running and when i release it he return to walk (I don’t know wich is better a walk_run blend or just the run annimation). I don’t have the idea to how to accomplish that :frowning: .

*When I press ‘CTRL’ the character crouch and if I press ‘Z’ while holding ‘CTRL’ the character moves while crouching and when i release ‘CTRL’ he stands.
I have the following animations:
*from standing to crouching.
*Walk while crouching.
*from crouching to stand.
but also i didn’t figure out how to do what i want :frowning: .

All the animations I use are from the Animation Starter Pack provided by Epic.

I’ll be very gratefull if you can help with this :o
and thankx for reading all of this :smiley:

Here we go. First of all we do the crouching. I dont use the animation pack and the included animbp, because I dont have it on my pc and you will understand animbp’s after that :wink:

**This will probably solve your problem:

  1. enable “can crouch” in the defaults from your character bp
  2. add a key event - a “crouch” and “un crouch” node - create a new bool and connect it with pressed and released** – one set bool should be true and the other one false:

  1. create a crouch blendspace:
    green= crouch walk
    red = crouch idle

Animbp:

4.add a „cast do mycharacter“ node – get the bool variable that we have created in our mycharacter bp – create a new one in the anim bp – connect the get with the set and the set with the cast:

blue = variable created in the animbp
yellow = variable from the mycharacter (we got it from the cast)

  1. add a new state (crouch) – add two links – in the link that points from the idle to crouch you have to add the bool variable and in the one that is pointing from crouch to idle the bool + a not bool node:

white – here you just have to add the bool variable (double click onto the little circle and in there you have to connect it)

  1. add the blendspace into the crouch state + connect a speed variable to it (like it is in the idle state)

Now to running:

In your character bp you just have to change the speed of your movement component:

yellow = sets the starting speed (so the “normal” one)
pink = set the running speed
orange = sets the speed back to normal

After you did this setup you just have to create a idle/walk/run blendspace -> in my case: idle at 0 -> walk at 100 -> running at 300

Edit:
I have took a look at it and you just have to change the event + add those crouch/uncrouch nodes (but now with my first post you know the technique behind it ^^):

Thnx a lot, that’s exactly what i wanted to see :smiley:

@: this is the blendspace

In the blendspace everything is correct but in the editor it’s like in the video

You have to add a walking animation ^^ -> because now it directly goes from idle to run. That’s why you get such a strange anim + change the axis range to e.g 300 -> because that’s the speed (= so at which speed the anim will play)

no no, at 0 it’s Idle and at 100 it’s walk, the run is in an other idle.
this is just when i press the z the character start walking
i tried to adjust the range at 30 , 100, 150, 250, 300 but always it’s the same problem

A ok, so when you press “Z” it should use the walk blendspace and when you press “Shift” the one with the other idle + run?

Could you also post a pic of your anim graph or a short explanation how your setup looks like?

Normally it should work like that:

Yes, but when i press “Shift” if a blendspace of walk + run not idle + run
Every thing else i like you showed me how to do it


Why dont you just add the running anim into the same blendspace? You can reach the same result with that technique.

Ohterwise change the >100 to >95 because probably the ue4 can handel that abrupt jump not so well :slight_smile: + how does your running blendspace look like?

the running blendspace : speed 0 = walking animation, speed 200 = running animation

Set the speed to 100-200. Now place walking to 100 and the running to 200. Because otherwise the walking will just be played when the player isn’t moving. But acutally it doesnt make any sense to me what you are trying to achieve -> why dont you just place it into 1 blendspace. Because then you can “activate” the “2nd part” with the movement speed ^^

Or explain it to me a little bit more in depth what exactly you want to do :wink:

no no, the run is perfect
when i clic on shift he start running
the problem is when he just start walking

Probably this video will help you. But as I mentioned above, you could also place everything into 1 blendspace :wink:

v=3apQ3A3pBnw

If i put all in 1 blend he will run when i press z not shift :stuck_out_tongue:

Ok, then do it like in the video above ^^

Hello,
It worked fine last time but when i try it again with the chacarcter provided with the starter animation pack i couldn’t find the walk speed

://im63.gulfup/OGwymI.png

You have to drag the link out from the movement component -> type in speed -> now you should see it :wink:

yep that’s right
same mistake twice by me :smiley:

I’v got a weird problem :confused:
everything here works fine
but if i jump while I jog or run the jump animation will be repeted for ever (when i jump from idle it’s working fine!!)

://im73.gulfup/YybBPa.png