Alright, I made my script, but I have 3 questions:
1.) Where do I put my X and Y Orientations?
2.) How do I add more people to this script, and also a placeable?
3.) How do I make this script work ingame?
I don't get what you mean by X and Y orientations
The three numbers you get when using the 'whereami' cheat should be entered in the brackets after 'Vector'.
CreateObject(OBJECT_TYPE_CREATURE, "kor_czex1", Location(Vector(#1,#2,#3), 0.0));
There is no way to get a number from the game about orientation so you just have to play around. The orientation goes immediately after the three numbers where the '0.0' is.
CreateObject(OBJECT_TYPE_CREATURE, "kor_czex1", Location(Vector(22.99,23.79,59.10), Orientation));
(This is the same for placeables by the way) to add more people just repeat the code but change "kor_czex1" to the tag of your other utc file.
To create a placeable replace 'OBJECT_TYPE CREATURE' with 'OBJECT_TYPE_PLACEABLE' and make "kor_czex1" the tag of your utp file.
CreateObject(OBJECT_TYPE_PLACEABLE, "kor_czex1", Location(Vector(22.99,23.79,59.10), 0.0));
OK, now comes the mini tutorial, getting it working in game. First you have to extract the original on_enter script for the area (should be a .ncs file) and rename it so it has 'old_' at the begining.
You already have most of your script done just make sure that before the final curly bracket you have:
ExecuteScript("old_old script name", OBJECT_SELF);
This means that the old code will still be run even with your new code running.
Then save your script BUT MAKE SURE THAT WHEN YOU SAVE IT THE EXTENSION IS .NSS AND THAT IT IS THE SAME NAME AS THE ORIGINAL ON_ENTER SCRIPT BEFORE YOU RENAMED IT OR THIS WILL NOT WORK!!!!!
(This cannot be stressed enough
Then you have to open up KOTOR Tool and open up the text edior from the menu at the top.
Then with the text editor open up your .nss file. (This is just an on_enter script I made for a mod i am making and it is for the Tatooine Cantina)
This next step is very important. Go to the script menu at the top and click on 'Script is for KOTOR 1'.
Now go to file, save and just overite the original file. (If you do this now then it doesn't make it more confusing later on.
Then go to the script menu again and click on 'Compile'
If all went well and there were no errors then this should pop up:
If not it will state the error and the line. Usually errors are quite easy to fix like you missed out a semi colon. If you get stuck you can post here or ask me
Then if you look in the folder you saved the .nss , there should now be a .NCS file. This is your compiled script and the file that the game can read.
Now you need to place your new compiled script and your old renamed one in your Overide directory and you are DONE!. Phew. My longest post yet.
If you have any problems just post them and i will do my best to answer them