The blueprint detects ceiling on crouch. If I uncrouch and it’ll detect a ceiling then I won’t uncrouch, won’t change speed and walk sound interval but there is a problem that I can’t automatically uncrouch when there is no ceiling. So I need to click Left CTRL again so it’ll check the ceiling and I’ll uncrouch. How can I make the ceiling check function update that other code would work? (sorry for bad english)
Hey, @JustChickNugget! The issue you are having is that your blueprint only checks to stand up once when the key is released. However, if you were to perform a continual checks once the button is released with a While loop for example, or have the blueprint always try and stand up unless the key is being pressed down and there is no ceiling above. Here is some documentation on Unreal Flow Control and how to use it. The While Loop in particular will be the last one.
But how can I use the While Loop in this code rightly? I’m newbie at Unreal Engine
Well, the easiest way, @JustChickNugget, have your crouch change a variable to true, and reroute your code to use a the While Loop. By using an or boolean operator, you will be able to check if either value is true, and will return true even if one is false. Your crouching action happen if one or both variables are true, and your standing actions if both variables are false. Here is a great video on using that or operator, and don’t forget to use the image in the documentation as the template for your crouching and standing actions.