When I was making my Tatooine Job Office (http://www.lucasforums.com/showthread.php?t=206577)
I wanted to find how to only make certain conversation options available after certain conditions had been met. Now I couldn't find a dedicated tutorial anywhere so I had to ask.
So I thought I'd make it easier by writing this tutorial. This is my first tutorial so go easy on me ;)
Things you will need:
Things you should read:
Right Script Conditionals. What can they do?
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:
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.
Most scripts start with:
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
Then next bit
The last bit
Then you must simply compile the script and put the resulting file in the same place as your dialog. (For information on compiling scripts see one of the top links) or see this brief tutorial below.
Firstly you need to open up Kotor Tool Text Editor and either write or open your script. (save it as a .nss)
Then you need to make sure it is saved and go to Script (in the top menu) Click whichever version of the game yours is for. Then click scripts again and Compile
If all went well a small box should pop up. If it went wrong there will be extra lines telling you what went wrong and a helpful line number in brackets ()
Now where ever you saved your .nss file, there should now also be a .ncs file which the game can read (Hooray!) that is the one that will need to be included in your overide folder or .MOD file.
It is then the name of that file (without the .ncs bit) that goes in your dialogue file. It should go in the part that says "Script that determines availablilty"
Hope this helped.
If you have any questions at all I will do my best to answer them.
|All times are GMT -4. The time now is 12:30 AM.|
Powered by vBulletin®
Copyright ©2000 - 2015, Jelsoft Enterprises Ltd.
LFNetwork, LLC ©2002-2011 - All rights reserved.