Check Forward Running

So, Im running a check where I can only sprint when Im moving forward

And it works just perfectly fine but when I first press shift(sprint) and then W it doesn`t go into sprinting anymore.

Set a breakpoint and see how the logic is flowing in your event graph during PIE. It is probably a value not being set at the time you expect it to or to the value you expect. BUt I can’t tell without running it.

its a bit hard to tell due to the low rez screenshots and the redundant script but it looks like since you are pressing the sprint button before there is any forward movement then your movement speed isnt being set to sprint. so you could just eliminate the check for forward movement and the sprint will function no matter whats pressed or you could overhaul your script a bit.

picture 1 below shows a method that should work for what your looking to do. basically you just add two checks into the movement setup, first you check to see if the sprint button is pressed, then you see if the forward movement axis value is positive, if both are true then you set the movement speed, if either is false you use normal movement. i used the 3 key as the sprint button in this case, and on the keys release set the movement speed to the normal value.

i also added a picture of another unrefined method i was working on that has the same limitations as what you described but is far simpler using less nodes.

but let me know how it works for you or if im missing the point, there was alot of guess work since i cant read the nodes in your picture. also let me know if you have questions.

Thanks for taking the time to respond but unfortunately the solution you provided me doesn`t work.

what happened when you you tried it? what aspect didnt work? i just recreated it in a third person character as well and it worked without issue (the first time i made it in a first person). you used the first picture right?

Yes, I did use the first one and the problem was still there, no change to the game.

so no changes meaning that your characters movement speed wasnt changed at all.

what does you blueprint look like? when you press the movement input do you get any execution (this can be tested by placing a print string just after the event)? also does the sprint button input work? you made sure to disconnect your old script before trying this new one right. have you done any debug to find where the script fails?

Well, Ive deleted the old script but kept the branches that I had to check if I wasnt firing, aiming or crouching and the outcome was the same, I couldve ran but when I first pressed shift I wasnt going into sprinting.

Yes and just to double check I`ve made it exactly as you have and I could run in any direction.

when testing were you holding down the sprint button? the script is currently setup so you need to be holding down the sprint button its easy to change to a toggle though.

ok so movement works it just not sprinting. you have the set walkspeed values set correctly right. and your using a greater than 0 for the speed. can you do some debug and print string between each step in the script to find where it fails. so put a print string on each branch on the true and false pins, this will tell us at which node the script is failing and where the problem lies.

Thanks for being persistent and for trying to help me but I tried everything and nothing will work.Anyways if no one will come with a solution I`ll mark this as solved

so your giving up then.

i was also going to suggest creating a new character and adding the script there as that will tell you if its an issue in the character or in the level or project.