IF so long has past without interaction THEN reset to main screen...

I am making a menu system, Relatively simple stuff… However I want an IF and Statement saying that if there hasn’t been any input in a certain amount of time, then reset and go to the main menu.

However I am not sure how to do If and Then statements in blueprints in Unreal 4. Can anyone help me?

Not sure of the best way to do the input part, but if statements are called Branches in BP.

I thought branches were for True/False statements not IF THEN statements.

It’s the same exact thing :stuck_out_tongue: if true … do that, if false … do something else.

I see what you are saying. But I think then my problem lies with I’m not sure how to code for lack of input…

Make a float variable by the name of TimeSinceInteract and a bool variable called HasInteracted. In each of your input event nodes, set HasInteracted to true. For your Tick node, check if HasInteracted == true. If it is true, that means…well, the player just interacted! Set TimeSinceInteract to 0 and set HasInteracted to false. This in effect resets our counter and turns HasInteracted back off (if we didn’t do this, then if they pressed a button once, we’d keep thinking they pressed it every frame!)

If HasInteracted ISN’T true, then add the Tick’s DeltaTime to TimeSinceInteract.

After this adding bit, check if TimeSinceInteract >= [however long the idle time is]. If so, then change the level to the main menu.

So Event tick-> branch (Checking "Hasinteracted) true->nothing False-> Delay 10 secs-> blah blah blah

I’m sorry I am not SUPER great at blueprinting yet,

Could you post a picture? Im not really accustomed to using float nodes yet.

Thanks in advance,

Afraid I’m stuck on mobile through Sunday. For interface tips, check out the official tutorials on YouTube.

Here is how I would do it. Every time there is an interaction the delay is reset. When it gets to zero you can do whatever you want at that point, it also will never get in the way of other functionality.

Help with time.jpg

Something like this?

Could you post a picture… Im still abit new to floats.

This worked awesome! Thank you!!!