I am new to BP, even coding so it can sound easy but hear me out!
I am trying to create a scenario where opponents generate random integers for three turns, every turn is executed with the same button on the widget, and after 3 turns the integers are summed to see who is higher to decide the winner. I want to use the same custom event and trigger it three times with the same code, but after 3 times I want it to calculate it.
OR should I use different variables for every turn and create an array with them at the end to compare the results?
Even then I can’t figure out how it should end at the 3rd time and show the results.
Here’s an idea for that, create a new increment counter variable. So, whenever you add the sum, this counter will next be increased by 1. Then, you can execute an event to see if your counter is 3 or not, if it is, then do your win condition checks but remember when you’ve done it, you need to reset this counter to 0 again so it will allow the next turn to be checked as well.