[Script Info] Title: [Events] Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text Dialogue: 0,0:00:04.98,0:00:10.36,Default,,0000,0000,0000,,Here's a function that draws a square with\N50 pixel sides. That's great but what if I Dialogue: 0,0:00:10.36,0:00:16.45,Default,,0000,0000,0000,,wanted to draw a square with sides 50 pixels\Nand another square with sides of 100 pixels? Dialogue: 0,0:00:16.45,0:00:21.20,Default,,0000,0000,0000,,We shouldn't have to make two separate functions\Nthat do almost the same thing. Instead, we Dialogue: 0,0:00:21.20,0:00:27.44,Default,,0000,0000,0000,,can use one function with a parameter. Parameters\Nallow us to pass values into a function that Dialogue: 0,0:00:27.44,0:00:32.25,Default,,0000,0000,0000,,get used as variables inside the function.\NLet's try adding a parameter called like to Dialogue: 0,0:00:32.25,0:00:37.86,Default,,0000,0000,0000,,this function so we can use it to create squares\Nof different sizes. In the function editor, Dialogue: 0,0:00:37.86,0:00:42.99,Default,,0000,0000,0000,,you can edit the name and description like\Nbefore but now you can also add a parameter. Dialogue: 0,0:00:42.99,0:00:48.28,Default,,0000,0000,0000,,Write the name of your parameter in the space\Nand click Add Parameter. This will create Dialogue: 0,0:00:48.28,0:00:54.46,Default,,0000,0000,0000,,a red block with the name of the parameter\Nyou just created. Now we can replace the move Dialogue: 0,0:00:54.46,0:01:01.97,Default,,0000,0000,0000,,forward by 100 block with the parameter Length\Nso it will move forward by Length. Click save Dialogue: 0,0:01:01.97,0:01:07.93,Default,,0000,0000,0000,,and close and drag out your new create a square\Nblock from the functions category in the toolbox. Dialogue: 0,0:01:07.93,0:01:11.98,Default,,0000,0000,0000,,You'll notice there's an empty space next\Nto length because the function wants to know Dialogue: 0,0:01:11.98,0:01:17.11,Default,,0000,0000,0000,,what value the parameter Length should have.\NDrag a number block from the Math category Dialogue: 0,0:01:17.11,0:01:22.05,Default,,0000,0000,0000,,and place it in this space. See how you can\Nuse the function again and again with different Dialogue: 0,0:01:22.05,0:01:25.89,Default,,0000,0000,0000,,lengths to make squares of different sizes?\NTry it for yourself!