arrow_back Flash Photography
This snazzy add-on will show you how to add camera flashes to your post-game interview, much like you’d see in real life. In your project, you’ll employ a clever trick to make it seem like a camera is flashing. Select the stage. You’ll use an effect to simulate a camera called "brightness." From the looks menu, drag out the "change effect" block, then change the dropdown to "brightness." Wrap this block with a repeat loop. The brightness effect can go up to 100, so to make the flash, use the repeat loop to maximize this effect.
Tinker with the values in the "repeat" block and the "change effect" block, and test by clicking to see how bright the background gets. To clear the effect, click the stop sign. This example uses 5 for the "repeat" loop and 20 for the "change effect" block. Once you put in the values you like for your project, right-click the loop, select "duplicate," and snap the new, duplicated code below the first loop. This second loop does the reverse of the first loop. Think of it as an "unflash." To make the brightness decrease until the scene is back to normal, make the number in the “effect” block negative.
Click the stop sign, then test the code. The background flashes and goes back to normal.
Next, place both these loops in another "repeat" loop. Then, insert a wait block at the top of the new loop. From the operators menu, snap a "pick random" block into the “wait” block. This outer loop will make the flash happen more than once.
Tinker with *all* of these values – change the length of time between flashes, how many times flashes occur, or how bright they look. Finally, place this new code stack at the end of your interview. Use an event or "broadcast" and a "when I receive" block to start it off; it’s up to you! Now you've got a cool flash effect that makes it look like your athlete is being photographed! Here’s the gameplan: Make two "repeat" loops change the brightness of the background.
Place the loops in a bigger "repeat" loop with a "wait" and a "pick random" block.
Place the new flash code at the end of the interview.