Once you do that, make a label for the script you are writing:
# script goes here
Then, add a new label at the top, and add pointers to your script like so:
script <script label>
Then, compile it using the Python script:
python make_script.py build
Once you do all of that, add the script to your game by finding the corresponding script NARC (in B2W2, it is a0/5/6), and replacing the script container that you want to (in SDSME, you can find a list of them, under the “script” section in the Map Headers tab).
An example of a script in action can be seen here:
If you are lost, there is an example script in the scripts folder which you can follow. I will make a more comprehensive tutorial later on.