Infinite loop

Has anyone got any idea why im getting an infinite loop with this?
I think something maybe wrong with the while loop.



I think it’s an issue with the “Retriggerable Delay”. It never get chance to fire the completed output as it’ll keep getting reset to 0 every time the whileloop fires. Try swapping it for a normal delay.

Rookie stab at this… but how does the loop know you’ve stopped running? At present, there appears to be no function ‘within the loop’ that defines running as on or off (because it the loop can’t reference anything outside itself until it resolves itself), and so it stays active when your player stops running?

Tried it, still gives me an infinite loop

first thing i see is that you set “is running” just before you use it as condition so your branch will always be true. Delete it.
Maybe i am wrong but i think that your infinite loop is created by the whileloop because it can’t be completed :" is running" is set false on release but whileloop “completed” is on pressed.
I would try to link your client play directly from your “can run” branch (with the delay and back to client play) and link your client stop from your released. (is running will be useless.)

Nice one, on is running true I start camera shake.
And on release is running false I set to turn off camera shake

I just noticed now that ive done this :


It sprints and uses stamina with just holding down shift.
How would I check if shift has been pressed and W key input axis = 1 at the same time. If I can do that then it would make all this very simple

Set variables that track when the key is pressed and then use an AND node.