Script conditionals can be used when you want something (usually a dialog option) to only be displayed once a certain condition has been met. Some of the common conditions used are:
Item in PC Inventory
There are many other conditions but as long as the condition returns either TRUE or FALSE then it will work.
Lets start Scripting!
First of all if you have only coded a little bit in KOTOR before then this will look completely different.
iResult = ((GetGlobalBoolean( "your_global_bool" ) == TRUE) );
Right lets break this down.
This starting line is different than most scripts in KOTOR for one reason. In most scripts you do not require an outcome as they usually make something happen. We however want an outcome so the dialogue (or whatever) knows what to do / display.
Most scripts start with:
Void is used when no output is required and means nothing or to get rid of.
Int is a variable type meaning that it has to be filled by something.
The StartingConditional() part tells the game that it is to be used as a Starting Conditional
The next bit
Here you are declaring the variable "iResult". You will use this variable to store the outcome and tell the game what to do. If you've never used variables before get used to it because they are VITAL to scripting.
This is the most important part of your script. It determines what must happen for the conversation option to become available and then puts it into the "iResult" variable. In this example it gets whether a global bool is TRUE and then outputs TRUE into "iResult"but there are other options such as