Lesson 22

Today, we will look at FUNCTIONS. They are like "mini-scripts" inside your script and will help you make your code shorter. Basically, they are not essential for coding as you can do everything manually, but just like loops, they will allow you to save a lot of lines of code and a lot of time.

They are not used in every script. I don't use them that often, but I know that I can use them when needed.

(25 minutes)

If this video is causing you issues, here is a copy on YouTube: (please, do not share)



Although a lot of my scripts use some functions like the FindSelectionPoint or the Pause script (which we will look at in the next lesson), some will also just use a function to show the final message if there are different ways the script can go (with multiple if/else) to avoid repeating the whole code (remember that my scripts are bilingual so every dialog message has to be in two languages, so it adds). Can you find other scripts of mine that use a function OTHER than the three mentioned here?

The forum thread is here.