How to matke tigger box = add score (integer + 1)

Hello Every one. I was wondering how to make trigger box on begin overlap add score to my score text in my widget.
I have sphere actor that overlaps trigger box at random times. How would I set it up so it counts the trigger box overlaps. Thanks to anyone that can solve my madness!!

Are your triggers placed in the level? Which blueprint is responsible for creating the widget?

overlaps are simple things so im guessing the issue your having is it affecting your widget. what is the setup you currently have?

you will either need a reference to the widget or have the widget displaying the value of a variable that is stored elseware. without know a bit about your setup and game then its hard to say do this specific thing.

the way i would personally have things setup would be to have a variable named score in the game mode and have the text in the widget bound to the value of that variable. then have the on begin overlap event just add X amount to the score each time. this would also enable you to have anything you want add to your score in the same manner.

heres a basic example of the setup i was talking about.

the first picture shows the widget scripts. the top one is the event graph where i establish a reference to the game mode byt getting the game mode then casting to the gamemode that i want so its identified then setting a variable reference (promote to variable so the variable type is set). below that is the actual binding for the text part of the widget that will display the current score, this section just gets the game mode reference then gets the score variable that is in the game mode then converts the integer to text.

the second image shows a basic script i made in the level bp to actually add to the score when the trigger box is overlapped by the sphere (i think thats what you meant). the script checks to see if the overlapping actor is the sphere then if it is the script gets the game mode and increases the score variable by a set amount and sets the value.

the third picture is just a little bonus since you asked about counting overlaps. the way to count the overlaps would be to have a variable that represents the number of overlaps and increment it each time the two target objects begin overlapping. also in case you dont know the ++ node is a integer increment node, its just a simpler way to take the incoming value add one then set the variable.