[Script Info] Title: [Events] Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text Dialogue: 0,0:00:05.40,0:00:10.31,Default,,0000,0000,0000,,When you use a repeat block to loop your code\Nhow does the computer know when it's repeated Dialogue: 0,0:00:10.31,0:00:15.86,Default,,0000,0000,0000,,enough times? The repeat block is actually\Nhiding a more sophisticated piece of code Dialogue: 0,0:00:15.86,0:00:21.59,Default,,0000,0000,0000,,called a for loop which counts from a starting\Nvalue up to an ending value by a specific Dialogue: 0,0:00:21.59,0:00:30.63,Default,,0000,0000,0000,,increment. For example, a repeat 3 block counts\Nfrom 1 to 3 by 1. Every time it counts, it Dialogue: 0,0:00:30.63,0:00:35.82,Default,,0000,0000,0000,,runs the code inside the loop. The for loop\Nknows how many times it has run by using a Dialogue: 0,0:00:35.82,0:00:40.02,Default,,0000,0000,0000,,counter variable that is set to the starting\Nvalue at the beginning of the loop and has Dialogue: 0,0:00:40.02,0:00:44.31,Default,,0000,0000,0000,,the increment added to it each time the loop\Nis run. As soon as the counter variable is Dialogue: 0,0:00:44.31,0:00:51.36,Default,,0000,0000,0000,,greater than the ending value the loop stops\Nrunning. The benefit of using a real for loop Dialogue: 0,0:00:51.36,0:00:55.47,Default,,0000,0000,0000,,instead of the repeat block is that you can\Nactually see the counter variable and use Dialogue: 0,0:00:55.47,0:00:56.16,Default,,0000,0000,0000,,it in your loop.