How to change the variable of my ThirdPersonCharacter via slider value?

Hi guys, I was trying to use a slider of widget to control the “walk speed” variable I created for my ThirdPersonCharacter and I just don’t know why it doesn’t work at all. When I change the slider value, the speed is still the same.

Here is my BP settings:

BP in my ThirdPersonCharacter, I used the “walk speed” variable to control the walk speed.

BP in my widget, the reason why you see I use this method three tims is I want to change three “walk speed” values in three ThirdPersonCharacter BPs:

Well, all I want to do is just to create a “Walk Speed” setting in my game menu. This problem really got me at all, I hope someone could help me and thank you guys!

Hello rhetttsai, thank you for posting your question.

This was a pretty cool idea and I was amped about testing it myself.

I read over your BPs and I am wondering the following:
-When do you change the player’s walk speed? I changed mine via calling an event “OutsideWalkSpeed”.
-Is by any chance of the cast failing?
-In the playerBP, I would check what the WalkSpeed value is before it is multiplied by the result of the WalkSensitivity minus Speed result.

The only other question I do have is if the characters are already in the level or if you intend to alter their walkspeeds before having them spawned in.

I hope this gives you a few ideas on where to go next. I look forward to your reply.

1 Like

Hi @Polite_Muon , thank you for your reply! You help me solve this problem.

The WalkSensitivity(its value = 5) is just a float variable to adjust the speed. I would have set it as an another slider-controlling value. Regarding your last question, each my character is the only player for its level, that is to say, their will appear when their levels start, so I don’t think I alter their speeds before they are added into the level.
The reason why I failed seems I didn’t call an event to put speed in before. Now I change it, and I will show you below.

Now I add one custom event named “Speed Value” in my character BP

And then I call this event in my widget BP, everything works now.

Thank you again for you reply! I am pretty new to BP and now I know I should use event calling in this case.

1 Like