I’ve been having a hard time figuring out how to do this. I have the widget to end the game and can end the game by jus pressing the button anywhere, but can’t figure out how to make it only on collision.
I have it so that once you overlap the box it says Press F to plant the flag, and Ideally when the player presses F the widget shows up that ends the game.
This is easily done by using eithe a boolean or a gate maybe. Set the boolean or open the gate on begin overlap. And unset the boolean or close the gate on end overlap.
All you do then is in your button press code check the boolean is true or if using a gate the output will already be correctly set.
You can put this check in your player or the actor object for the switch whichever suits you best.