How to control the speed of a character/object by touch?

Hello everyone,
I am new to Unreal engine and currently, I am creating a small game for mobile phones. I would like to control the speed of the object/character by touching anywhere in the mobile screen. Say for example in Aspault 8 game, to raise the car speed we can touch anywhere on the screen for nitro. I wish to implement the similar feature to increase/decrease the speed. Please help me how can I achieve it.

Thank you so much!

I could able to move the object by a predefined speed. I need some help for updating the speed. Please help me.!

I dont know how to trigger the new speed on touch. (second half of the BP is a try to set speed on pressing left shift button. But it is not working.

alt text

i think you are looking for this?

i’m just a noob because i just started to learn this programm and i made this in a blueprint of the charactor

i made 2 variables with
SpeedWalk and the value = 900.0000000 = running speed
DefaildSpeedWalk the value = 600.000000 = walking speed

here i have a picture for you how to setup.

you may change the input to your character to work but i think this works because i just build a lite game and i use this for walking en running and it work good so far :wink:

i hope this helps.


Is this in character bp event graph? construction script? class bp?