FIX COUNTING BUG
You might have noticed that our flags can be counted twice, causing the trophy to display early. We can prevent this by disabling the trigger and turning off interaction with the flag.
Looking at our FlagTrigger script. From the Actions tab, bring over Disable Object, and Set Simulated. We will use Disable to turn off the trigger, Self, so it can no longer detect flags. And at the same time we will lock the flag in place. Do this by setting Simulated to False, and drag the Object variable from the Trigger Enter Event to replace Self.
COUNT OBJECTS IN TRIGGER precedes this tutorial
With that done, let’s place these flags around our world to build the first part of our mini game.