Wait for Key Press bool then save level?
So I'm trying to create a level saving and loading system.
At the moment I have a saving system working as well as a loading system. My issue is extending the saving system to include a save data overwriting option.
I have a function to save the game which checks if the user has saved before. If they have, then it runs the overwrite function. as seen below.
Inside this function, it checks whether the overwrite bool is set to true.
The overwrite bool is set via button press.
If the overwrite variable true it should save the game, and if it is false it should create a new slot. However, when I get to the branch to check if the overwrite bool is true, it is always FALSE.
Is there any way to wait for a key press for multiple buttons?
I did try the node 'Is Input Key Down' but the overwrite bool check never gets fired.
I think you have the programmer's blues running and are too fixed on the problem! :)
Don't wait for the key, let the key be the trigger for an action! So instead of starting the save process upon the player's "save now", you should do this:
This way you have an asynchronous process without the need to do some akward check-if-the-player-did-something cycle in the background.
answered Dec 07 '15 at 09:58 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here