Look into using Input Axis bindings. This will allow you to get the result you’re looking for. For reference, look at how the Third Person Template has its movement set up, as this seems to be closer to what you are looking for in your project.
I’m sorry but, I understand the setup. I just want a way to make the character to stop/start moving. I cant seem to turn on or off by setting up the axis by pressing the mouse left button.
You can use the suggestion as Sean provided with using a timer, although this isn’t much different than actually using tick. The computer still needs to process that information X amount of times per tick/interval regardless if it’s in tick or not.
However, using the timer example, you need to realize that the timer is continually running when set on loop so trying to get the character to stop as you provided obviously doesn’t work because of the timer. Therefore, you need to stop the timer. You can either use Pause Timer or Clear Timer. Then to start the timer back up either unpause or Set Timer, depending on how you stopped it. To use the pause/clear functions you need to get a timer handle to your timer. Right click the “Return Value” on the output of your timer and select Create Variable - there is your handle.
Not too complicated here, there’s more you could probably do with this to get better effects but this is ultimately what you would need in order to start/stop the character from running:
The function ‘Run’ that I put into the Set Timer isn’t a function I created for this demonstration. This function is whatever function you have created to make the character run.
Cool glad you got a solution. If my answer helped you at all, it would be greatly appreciated if you accepted the answer as correct. You’ll know you accepted it when the answer and all of its comments turn green. Thanks!
You are trying too hard when u have an easy option
use a timeline and give x axis value 1 at zero second or any speed u want and attach it to “add movement input”
Checkout the image below
Timeline attached to “add player movement input” in character blueprint(which is hero in my case)
For the vector needed in “add player movement input” make vector and give input for any axis in which u want to make the character go ahead.(for me i want it to go forward in x-axis )