Carry Forward Input on Level Load/Restart

Hi all

In my game, I want the inputs that the player is currently pressing to be carried forward when the next level loads and/or when the level restarts.

For instance, if the player is pressing the move forward key (W) and the level restarts because the player falls off a ledge, I want the player to be able to continue pressing the forward key, and the player starts moving forward when the level restarts.

I have noticed that if the move forward key is the last key pressed prior to when the level restarts, if the player is continuing to hold the forward key, the player will move forward after the level loads if no key was subsequently pressed. However, if the player presses another key after pressing and holding the move forward key, when the level restarts, only the last key that was pressed will work if it is being held.

For instance, if the player is pressing and holding the move forward key to constantly move forward, if the player presses the jump key and then falls of a ledge and the level restarts, if the player is still holding the forward key, the player will not move forward when the level restarts unless the player stops pressing the move forward key, and then presses the forward key again (or presses the move forward key after pressing the jump key).

Is there way to ensure that the move forward key input is carried forward when a level restarts/loads, even if other keys were pressed after the move forward key was pressed and held?

Thank you again for any assistance.

Cheers

Matt

No solution to this one?