Download

How to add Walk/Crouch to "Third person" starter asset ?

I’ve been trying to figure out AnimBlueprints for sometime now . I’ve got basic understanding of how it works but not that much to add my own functions to it . can anyone please guide me , or point me to any tutorial explaining how to edit AnimBluprint to have support for walk or crouch or basically any other state than idle/run . i’ve seein the first “person shooter tutorial” btw.

I’m using the 3rd person starter asset btw.

PS . I’ve heard Zack Parrish is making a tutorial for AnimBlueprint . is that true ? if it is when it is going to come out ?

Can someone please help me to setup the Walk process or point me to the right direction please? is there any tutorial out there for AnimBlueprint ?

3rd person starter asset already has a walk animation sequence.

The idle->walk->run blend is handled by a ‘1D BlendSpace’ inside the AnimBlueprint. It uses the players speed to blend between those different animations. You can modify the players ground movement speed (MaxWalkSpeed), either in the Blueprint defaults or using a Set node.

create a first person BP proyect, you can look how work jump, imo crouch can do it in the same form.

Thanks for the response , that is exactly as far as i know , i need instructions right after this point . since i’m trying to make the character walk by pressing shift , < run while not pressing shift >
I figured i should set the “speed” variable in animbluprint to around 100 which is the walk speed defined in BlendSpace for this character. But in the “AnimBlueprint” for the character , i dont have access to any input Nodes , but i have access to variable speed , In the “Character” blueprint i have access to input nodes but the variable " speed " is missing . so how or where do i alter the speed of character by pressing a key ? a screenshot will be really appreciated. ty

Just open one of the Epic’s template and try to copy all things they did in there templates.Than you will understand basic principles .Look at Tesla’s tutorials at YouTube. There is on good tutorial about creating what you need .Just type “tesla ue4” in Youtube and learn=)

I’ve inspected the template like 20 times by now , i understand what is done to make the character do what he is doing , i dont know what i should do to make it do what i want it to do .
I’ve already seen Tesla’s tuts . they are good and all , but his version of the crouch only applies to first person which only reduces the characters height . in 3rd person there is animation needs to be played and such , it is different and there is nothing about walking.

And yes 3rd person template doesnt have a crouch animation, but it has walk . although i have my own custom character with all the animations i need and it is already running and jumping . i just want it to change to the goddman walk animation and slow down when i press the shift . i tried whatever i could think of for a week now , and all failed . i really hate this new Anima system…

I think the first thing to understand is that the input controlling the actual movement happens all inside the Character Blueprint. Nothing inside the AnimBlueprint affects how fast the character walks. You want to add some logic to the Character Blueprint so that pressing shift changes the walk speed on the CharacterMovementComponent to a lower value and releasing the shift key increases it. Then you can adjust the 1D blend space in the AnimBlueprint so that your walking speed corresponds to the walking animation. I hope that helps!

ShadowOf047 ,I suggest you always to make things simple . I would do the next steps: you need to play crouch animation ,there are 3 differences from your base walk animation : 1.Player speed ,crouch has less speed - So just adjust player speed why pressing the crouch key. 2.Animation itself -play in BP your crouch anim why pressing the key than switch back why key is not pressed. 3.COllision -crouch ,for example twice shorter so make new collision box.There are also more easiest ways .Thats just some sort of basic example of logic.

I cant think of any logic to alter the value of “Speed” float , which is in animBlueprint, from the character blueprint . thats what i said in my previous posts. would someone be kind enough to tell me how to do this with an actual screenshot ?!

What i did is i defined an key for walk in Action mapping section of the project setting . that would give me the node "InputAction Walk " in the Character blueprint . now i need to connect the “Pressed” to the to the “Set Speed” variable which is in the AnimBlueprint and set its value to about 95 which is the walk speed according to blendSpace . but how can i access the Speed variable in another blueprint ? or is there another way to decrease the speed ?

First step : that is what i am asking how to do , and i have asked like 5 times by now. Second step : this is handled by the BlendSpace Idle/run, which already includes walk animation inside it . Third step - there is this “Crouched Half Height” value for collision height in default properties for the character to make it smaller .

you see …you can do everything by yourself (sarcazm),I think nobody helps you if you will act yourself in that manner.The suggest was if you don’t know how to do basic things make them in easier way.On you question: Set max speed do all what you need ,really can’t understand what the problem is,it is very simple just one node…Ok you asked how to access variable in other blueprint .=> "Cast to " node in you blueprint can get you access to variables in other BP’s.

I know the “max walk speed” in the defaults changes the character’s speed . but if i change it via defaults , the character always moves at that speed . And i didnt find any Set node to change to set a new value for it in the EventGraph , there are only Get nodes as shown in the screenshot.

Can you PLEASE for 1 moment set aside the theory of how its done and actually tell me how to do it in an step by step manner like this :
1- grab a “X” node and connect the ouput “Y” to input of “Z” node
2-…
3-…

or an screenshot would be really appreciated .

This simple blueprint setup prints the max speed to the screen . how do i change this to make this work ?! Thanks.

At last i figured it out . here i’m posting the screenshot for anyone that wonders how its done . screenshots are nice, arent they ? i asked for it , instead i got " hints " , which ultimately led me to the solution of this , but wasted so much of my time .

BTW , that " Cast to characterMovementComponent" is so hard to find , if you type " Cast to" it wont show up , if you type “Character” , it wont show up , if you type "Character Movement " or even w/o space , it wont show up . ofc “Context Sensitive” is not checked . ATM i dont even remember what i typed that it showed up.

P.S. it never shows up if you try to just create the node solo , even with context sensitive unchecked !!! you have to drag a wire of the “get movement component” node for it to show up ! thats kinda tricky and stupid…

Glad you find it yourself! Isn’t it what I suggested you to do?! "“Cast to " node in you blueprint can get you access to variables in other BP’s.”/quote

yes as you suggested the concept of casting , i went there and typed “cast to” to see what types of casting are available . but as i said in my previous post , the right casting node for this matter only shows up in that situation , so i didnt find it at that moment. what i did was i drag of a wire from every possible relevant node to see if it works…

Yeah, don’t feel bad about not finding casting. It really is hard to find. The thing to remember is, if you are using something like “Get Player Controller” or “Get Player Pawn” and you drag off the node attached to it, you can Cast to that object. I believe you can do the same if you select an Actor in your world. Once selected you can add a reference to it and then drag off its node and Cast To it like you did here. You may even be able to do that with an Actor variable.

Glad you got it working! Rather than grabbing the ‘0’ player globally and casting its MovementComponent, you should be able to just directly access the CharacterMovement variable in your Character Blueprint:

WalkSpeed.jpg

yes, indeed you are right . thanks for clarifying and cleaning up the BP , and thanks to other responses also.

Now i’m moving to phase 2 , which is crouching . i made a “crouch” state inside the blueprint with a bool named “bIsCrouched?” then set the rules up as follows in the screen shot , and defined a key for crouch in the project setting (c) .

now i need to access the bool “bIsCrouched” and set it value to true everytime i press C , but then again i cant seem to find anyway to access this variable from character blueprint , not even with casting . so what’s the right way to do this ?

try search ‘owner’ where it says get owner from a component, since your bIsCrouched is set to the actor itself, not the movement component.

it is not working . bIsCrouched is still not showing up . Also there is another bool with the exact same built in in movement componenet , although it has complete tooltip . i changed the name of my bool to bIsCrooched , and couldnt find anything . is this even possible ?

Is this even the right way to make the character go to another state ? or i’m just chasing wind ?