Is it possible to end your game with a trigger box?

If you mean quit the game if the actor stays within the trigger box for 5 seconda, but it will not quit if the actor leaves before the 5 seconds are done, then sorry i dont have screenshots but i have an idea:

Make a boolean variable on the actor class that would be entering the trigger box, and call the variable InsideExitZone.

OnEventOverlap of the Triggerbox in your Level Blueprint, cast the Other actor to the class that has the InsideExitZone, and call a function (that you make) on that actor named CountdownToExit.

OnEventUnoverlap (or whatever it is called) set the Other actor’s InsideExitZone to false.

In your Actor class that has the InsideExitZone bool and the CountdownToExit function,
The first thing to do inside the CountdownToExit function is to set InsideExitZone to true. Rigut after that, Put the Delay 5 seconds node. Coming off the Delay node, Branch on InsideExitZone. If it is true, Exit the game (there is a node for that). if not, do nothing.

If the actor leaves the trigger box before the Delay is done, it will set the recently true-ified InsideExitZone to false before the delay proceeds to its next node (the branch toward Exit Game), and the game will not exit.

Hello peoples. I was wondering if there is a way you can close down your game with a trigger box maybe with a delay on it? So say i would walk into a trigger box and after 5 seconds the game would automatically close down? If thats possible screenshots would help on how to do it <3

this is my bp setup

when the player walks into the input action it stops them so in that time i want it to stay like that for 5 seconds then it end the game since its a jumpscare. Im not the best with bp i looked everything bp wise up on the internet since i have no experience with it. [im 16 atm] Dont want to make it annoying for you to try and explain and me not understanding. So thought id clear that up.

Okay so if there is no way for them to get put lf the game quitting pnce they touch the box, then you can probably forget what i said and just put a delay node followed by an exit game node (or whatever it is called).

But I wonder why exit the game completely and not just open another level instead, or bring up a menu like (retry/quit)?

I wanted to do a menu thing but it bugged out on me and it kept going to the main menu after a certain level instead of playing the next

most likely you can fix the blueprint code for that. show what it looks like. maybe i can spot the problem