# Variables not updating with user input

**URL:** <https://forums.unrealengine.com/t/variables-not-updating-with-user-input/582704>\
**Category:** Blueprint\
**Tags:** unreal-engine, UE4, Blueprint, UE4-27, question\
**Created:** [June 15, 2022, 3:45pm UTC](https://forums.unrealengine.com/t/variables-not-updating-with-user-input/582704 "2022-06-15T15:45:23Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![ijackson16](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ijackson16](https://forums.unrealengine.com/u/ijackson16)\
**Post date:** [June 15, 2022, 3:45pm UTC](https://forums.unrealengine.com/t/variables-not-updating-with-user-input/582704/1 "2022-06-15T15:45:23Z")

</div>

I’m trying to have the speed of my character change with an accelerator button (‘W’ on the keyboard). This worked earlier today, but, according to the debugger, the speed is no longer updating. Here is my blue print for the updating:

![modulate speed](https://d3kjluh73b9h9o.cloudfront.net/original/4X/1/5/7/15717b6de0b68b1ac56aeac0f67715cc1526907a.png)

Here is the auto-walk that is supposed to be modulated by the updating speed:

 ![auto-run](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/4/c/74c57dfbbfd1413b60f031b90885be5f5a920d40.png)

And here is the beginplay event, which sets the speed and accelerator:

![beginplay](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/6/e/a6e315743a58075f0318dfc06c9cf7a1717c1dbc.png)

During play, the speed stays constant no matter what I do! Any advice? Thanks!

---

<div class="post-metadata">

**Author:** ![ijackson16](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ijackson16](https://forums.unrealengine.com/u/ijackson16)\
**Post date:** [June 15, 2022, 3:46pm UTC](https://forums.unrealengine.com/t/variables-not-updating-with-user-input/582704/2 "2022-06-15T15:46:21Z")

</div>

This blueprint is for the playercharacter by the way

---

<div class="post-metadata">

**Author:** ![ijackson16](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ijackson16](https://forums.unrealengine.com/u/ijackson16)\
**Post date:** [June 15, 2022, 4:23pm UTC](https://forums.unrealengine.com/t/variables-not-updating-with-user-input/582704/3 "2022-06-15T16:23:34Z")

</div>

Thanks for your reply… I just tried this with default values (0.01 and 0.01), and it looks like they’re not being added correctly:

 ![they are not adding](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/1/b/21bf39a7915448d8b5a09681bdba78e412b77d83.png)

Do you know why this might be going on or any ways I could solve?

---

<div class="post-metadata">

**Author:** ![Humanasset](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/humanasset/32/251551_2.png) [@Humanasset](https://forums.unrealengine.com/u/Humanasset)\
**Post date:** [June 16, 2022, 8:19am UTC](https://forums.unrealengine.com/t/variables-not-updating-with-user-input/582704/4 "2022-06-16T08:19:45Z")

</div>

I haven’t seen it done this way… I think if you have added your input action (w) being pressed with a value of 1 you can assume forward speed at that value. and -1 being the opposite direction. Or 0 to be neutral value.

You may need to feed the axis value into your speed otherwise it doesn’t know whether your value is 1 or 0 or -1 so essentially nothing is changing…

So if you wanted to move forward with “W” than the values in your input action should be between 1 and 0 and if you wanted to use “A” to move backwards it’s value being 0 and -1. But the axis value needs to be the input?

---

<div class="post-metadata">

**Author:** ![ijackson16](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ijackson16](https://forums.unrealengine.com/u/ijackson16)\
**Post date:** [June 16, 2022, 5:40pm UTC](https://forums.unrealengine.com/t/variables-not-updating-with-user-input/582704/5 "2022-06-16T17:40:56Z")

</div>

I did it this way. It seems to work! Thank you

---

<div class="post-metadata">

**Author:** ![ijackson16](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ijackson16](https://forums.unrealengine.com/u/ijackson16)\
**Post date:** [June 16, 2022, 5:41pm UTC](https://forums.unrealengine.com/t/variables-not-updating-with-user-input/582704/6 "2022-06-16T17:41:12Z")

</div>

No worries, got it figured out. Thank you for your replies!
