Making your character sprint with Blueprint

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.

I posted a Blueprint Sprint setup here.

Hope you find it useful.

The solution you put up lacks explanation.

Sorry mate. I’ve replied with more info.

Thanks dude. You really helped me out :slight_smile:

Any reason I would not have access to the link provided?

i can’t access the link either. :frowning:

Is there a way you can post your Blueprint Sprint setup somewhere besides epic forums? Some of us cannot access the page provided. Thanks!