Im new here, I making first person game, and my question is how to make player crouch and there is a way to reduce speed when crouching?
I saw a few tutorials for that on youtube
You can find tutorials online really easily, but basically, you just need to add inputs in your project settings or use any key you want for that crouch to work. Later, you will need booleans in the Blueprint section to tell if crouch is pressed or not, then you will have to set the max character speed lower by getting the character movement. In addition, you will also have to change the Z-axis of the first person camera lower when the crouched input is pressed.
Sorry, but I don’t understand. Im not using any template, I have blank and only starting items. I have scripts for moving and looking, but I don’t know it is only Camera or character. I tried some tutorial online but every don’t work,I don’t know where is problem, here is my script for move and looking:
I don’t have any other scripts, I just testing for now. What I need to do now?
Oh, I see, my bad. Well for some reason I cannot view your image as it seems you did not upload it right, however, would you like to see an example of mine?
Yes, I really need help
Okay, as you are doing a first-person game and depending on how you want your crouch to be, this is how it’s done. You get the input you created from the project settings into your Blueprint character, you then create Booleans and set them to check if they have been pressed or not. If it’s pressed, set the max walk speed to any figure you want to slow down. If it is not pressed, then you type in your current walk speed you have your character by default. I have a branch because I have a jog function as well so you do not have to add it if your character does not use it. FlipFlop you can use if you want to toggle your character to crouch, however, if you want just hold the input button, just have the release key to the not set crouch. Lastly, make sure you call Character movement and link with the walk speed, otherwise Unreal Engine won’t know what you want to change the speed.
For your character to lower himself, you will have to configure the Z-Axis from the camera to go down when the input has been pressed. I do not have it here as I am just doing a Third Person game so the animation does it for me.
I hope this helps.
They will be on the Variables section on the bottom left side of the Blueprint screen which there should be an option to create a variable if you hover the plus sign. It will make a boolean and you can change it to any variables you want. If you want to set it, you easily drag it out and drop it on the event graph which gives you an option to Set or Get.
I do advise you to watch Unreal Engine 4 tutorials.
Blueprint Essentials: Variables Overview | 01 | v4.2 Tutorial Series | Unreal Engine - YouTube Check this for learning more about Blueprints.
https://www.youtube.com/user/VirtusEdu Watch this guy’s channel, he is really good at making basic and base features to get you started in creating games.
Thanks for help