I am trying to figure out how to make my character sprint using the UE4 First Person Shooter example.
Since I can’t really just learn C++ like that I wanted to do it in Blueprint instead. Issue is that in my mind I still think like a programmer but the Blueprint system doesn’t make that much sense given that I think this way.
I try to check if a key is pressed, make the players speed raise to a max speed I set over time so that you don’t start sprinting straight away. In code that would be something like (just pseudo code):
function sprint()
maxSpeed = 1000;
while(KeyIsPressed(LeftShift))
{
if(player.speed == 0)
{
if(player.speed < maxSpeed)
{
player.speed = player.speed + 50;
}
}
}
}
But I can’t really figure out how to translate this into Blueprint.