My game is taking place over a few days, so how would I make it so that once they complete x amount of objectives they can sleep? By sleep I mean the screen goes black. Also, is there a way to change the environment as they sleep?
You should download the Solus Example map from here: The Solus Project ~12 hours of UE4 in-depth tutorials + example content from Solus - World Creation - Unreal Engine Forums
His hud fades in and out when starting the game. Look at how he does it and use what you learn to make your hud fade out when you sleep.
When the hud turns black you could then throw up a loading screen and load another level. This video should teach you how to do that. Unreal Engine 4 Tutorial : Loading Screen / Level Transfer - YouTube
The objectives that have to be met could be bool values that are set to true when they are completed. You can reference these in the sleep blueprint and use branch nodes with the objectives as the conditions to make sure the player can’t sleep until all requirements are filled.
Hope this helps!
The Solus Example did not work for me. How else could I go and make the screen fade to black?
How would I do that in Blueprint? What are some nodes I would need?
You could make a widget that changes the opacity of a black image from 0 to 100% and then back after some period of time or an event. You don’t necessarily have to use an image.
You can set it so that after the player interacts with a bed or something then that widget gets added to viewport and plays that opacity animation. You can execute whatever other code you need after than then at the end of it all play another animation using that widget that takes opacity from 100% to 0% then remove it from viewport.
You would use a widget blueprint and within it you would set up an image to cover the screen. You can learn about Widget animations here: Animation | Unreal Engine Documentation
In another blueprint, such as a blueprint for a bed, you could have an input trigger and event such as playing an animation or adding a widget to the screen. Add to viewport would be a node you would use and then remove from parent is the node you would use to remove it from the viewport.