Max walk speed not changing

I can’t change the movement speed. When I change the value of the movement speed in the character blueprint it doesn’t change anything its the same good old 600 cm/s. Tho when I started this project I made sprinting mechanic and it worked just fine but after some time I guess it just stopped working. If you need any further info just ask me.
Thanks in advance.

How are you changing the speed? Are you changing it in the movement component at runtime or in its default values only?

Seems to be working ok in 5.0.3 with this test BP

1 Like

Well you see at first I just made it when pressed shift to run and it worked fine but now even if I change it from the character movement it doesn’t change anything.

Have you tried retrieving the max walk speed from the movement component after the shift change and printing its value in debug?
Is it the changed value or the default?

well, I created some strings that every .2 secs show the value of max walk speed and if shift is pressed.
Screenshot_26
as you can see I am pressing shift but the value does not change. And the sprint speed value is like 99999 or something

Can you post the segment of the blueprint where you change it? Is it being modified anywhere else during game play?
Does character gear or power-ups influence speed in any way?

That’s sprint:

Walk :

Character movement:

3 different values and none of the are displayed when print string.

Your sprint speed exceeds you max walk speed by a large portion. Maybe that’s why it’s not working correctly?

Your walk speed is also rather high. Perhaps change the blend space for walk / run to start at a different value. You character is constantly above the walk cycle speed at these values

nope… change it. still not working.

Default walk animation on the blend space is around 230 speed and your walk speed is well over the run speed in the blend-space.
You will constantly have a run animation playing no matter if walking or running.
You need to modify your blend-space extending the areas where it changes to make it work visually.

Also you are not getting any “no” in your debug so it’s not returning to walk. Check if walk is called on the release of shift

Depends on your play mode… Listen Server (you are the server), Client (your autonomous and the server is Auth).

You need to apply the change to the server as well.

Input Press → switch has authority[remote] → Set speed → Srv Set Speed (event)

Srv Set Speed (run on server) → switch has authority(Authority) → set speed

1 Like

You could try setting your max speed inputs at the tail end of your add input movement node and check them with a branch. So in lieu of setting the speed with your input key, set a boolean that says “IsSprinting?” and set it to true on the pressed and false on the released and on the back end of your add movement input node get that variable and off true set your movement component’s max speed it to your faster speed and off false set it to your slower speed.

The axis values change in a single frame when there is input so I believe it reverts back to whatever as soon as the next frame passes. I use this set up and it works on virtual any client or server setup albeit with further replication events triggering this… You can verify this by putting a print string on the back end of this node, but it prints A LOT very quickly.

The click counter will allow you to count your clicking. Howover your computer mouse over the bottom of the remote control to reveal small buttons that let you count up or down through specified steps, or press the Area button on your keyboard.

Thanks for all your help and assistance tho I found a solution that works for me, myself. If anyone asks I just connected max walk speed to event tick and then made a gate when shift is pressed to be open and when it’s not to be closed:


Again thank you for all your help and now when it’s done I can say that I honestly didn’t understand most of the things y’all type.

You realise you will be setting the speed constantly around 60-120 times a second? Why not do it once on key press to save cpu cycles?

You must be setting the speed somewhere else in the project. Try finding the character movement component use in your whole project and check if its not being reset somewhere.

Try avoiding tick whenever you can.

In a multiplayer setting you’re going to quickly max out your bandwidth and saturate the network.

OK so… update to what a dumbass I am. So in the beginning I had crouch function and I made it when crouch to move with 300 cm/s and when not with 600 cm/s AND I connected it to event tick because then (like a month ago) I thought to check a boolean variable you had to check it every tick and the BP was pretty much if you are not crouching EVERY TICK to set the speed to 600 cm/s. So yeah… and my thinking process wasn’t very smart… I just started breaking links from event tick. good think now I have another problem so I hopped on to UE forums and I saw your replies. So thanks for not letting my dumbass actually set the speed every tick and possibly running the game with 15 fps.

seems trying to change the charictor movement component at run time is not the right way to go about this
as it affects other charictors and creates issues with server client replicate movements
but i did find a work arround for walking at least

what you need to do is set the default char walk speed to be the max rate it will ever move (this also affects all pawns of the same class )

then edit the controler for that pawn be it player controler or ai and find the pawn movement inputs
and scale down the input scale values

in the case of the bp above i get my player fitness value (between 50% and 200%) / 200 to give a value between 0.25 and 1 and multiply this by the scale value from the player controler input
this limits the max movment speed from the analog sticks to a percentage of the max movment rate of the player without affecting other players or ai
although you will need to scale the inputs of those also according the the max movment speed you wish them to be at (as otherwise they will all be the higher default movement speed)

ie if you set the movment speed component default to 1600cm/s as 200% in the example above 100% fitness limits it to 800cm/s

also as this is done in the usual player controler /ai controler BP it does not need the overhead of event tick’s to change the movement components
and you can then change the movment rate percentage on the fly per charictor at run time by changing the fitness varible in the player controler( ok so i pull the value from my main game stats saved game varibles )

(just need to find a way to do the same for jump now )

我也遇到过同样的问题,可能需要修改网络模式(Network mode)才能正常运行。