Order matters

Beginners

Something that you should know about TSC scripting is that

THE ORDER IN WHICH YOU PUT YOUR COMMANDS DOES MATTER.



Let's use our simple message as an example once more:

data

So how about we switch up the order of the commands?

data

All I did was move the MS3 command to the end of the event, however this has a major impact

on what happens during the event.



The game reads events like how you would read a book, it reads from left to right.


So here's what would happen if you were to run the edited event:



The game would freeze from PRI


Then the game would then wait for player imput, from NOD


Then the event would end with the END command





And the MS3 command would be completely ignored.


Why? That is because it is in green.

data

Whenever you see commands in the script that are in green, that means that the command will not be read by the game.





But why is the command in green? That's because it was put after the END command.





Remember that when you put in the END command, that describes the end of the current scripted event.

So the game ends the event before it ever gets to the MS3 command. Thus, it is ignored.







There is one thing that doesn't need to be done in order in the script: the order in which events are ran in-game.



If I were to write some events, say... like this:

data

You wouldn't need to run event #0101 before you could run event #0102.




Well, that does it for the beginners section of this guide.

You should at this point, have a somewhat basic understanding on how the interface works.

The next section will go over all of the vanilla TSC commands in detail.

Previous Lesson: Arguments

Next Section: PRI and KEY

Table of Contents