Toggle Day / Night Cycle

Hello,

I’m totally new to UE4 and game engines in general and was hoping for some help with something I suspect is a very basic operation! I’ve created a standard day/night cycle using blueprint and was hoping to make it so that I was able to start and stop the cycle by using a keyboard entry. The blueprint I’ve used thus far is as follows:

.

Any help for a lowly beginner would be gratefully received! :slight_smile:

Thanks.

Add a condition to the timer based on key press.

Hi Errvald,

Thanks for the advice, that is what I was hoping to do but I’m still a little unsure about how to go about doing such a thing! As I say I’m a complete novice at this, would you be able to specify exactly how this can be done? Sorry to be such a noob about this but we all have to start somewhere right?! :slight_smile:

Thanks again

Straight after the ‘Event Tick’ node add a ‘Branch’ node, create a Boolean variable that you feed into the the branch condition input, then make a key press event for whichever key you would like to use and on the ‘On Press’ output create a ‘Flip Flop’ node setting your Boolean variable to true on one of the outputs and false on the other. This will allow you to toggle the cycle on or off

Great stuff, managed to get that working now thanks to your help! Really appreciate it, back to the tutorials for me for a while I think!

Thanks again