PDA

View Full Version : When i make a npc unit in my .MOD it isnt there


Myster
10-27-2005, 03:35 AM
I did DoomDealers noob guide to modules and when i made the guy it just wasnt there in the area.
Ive got no idea wats wrong but i realy wanna no so i can make my own tweaks to the game.
anyway i dont think its a problem with the model becuase i go the defult m17ac.git and it worked with the defult npcs and then i changed the model of hk to a jedi guy and that worked but i cant seem to add new people.
can sombody help or direct me to a tread that will help me out?

thx

Pavlos
10-27-2005, 04:38 AM
Well you can drag and drop them in if it is a module supported by Kotor Tool's Module Editor and then change their properties, giving them a new ResRef name etc. etc. Or if it is not you can do what I did for practice, spawn an NPC when you enter a module using a script:


void main()
{
object oEntering = GetEnteringObject();
object oPC=GetFirstPC();
if (GetIsPC(oEntering))
{
if (!GetIsObjectValid(GetObjectByTag("o")))
{
CreateObject(OBJECT_TYPE_CREATURE, "o", Location(Vector(-78.45780,14.12259,0.0), 277.22565));
}

ExecuteScript("1k_204tel_enter", OBJECT_SELF);
}
}


that is just an example. What you want to do is rename your origininal spawn in script to anything you like and put it in your Override Folder, or Mod. file whatever. THen where it says
ExecuteScript("1k_204tel_enter", OBJECT_SELF);
Put the new name of the script you extracted.

Remember to replace the Location(Vector(-78.45780,14.12259,0.0), 277.22565));
with you xyz cordinates from the whereami armband (Great Tool btw) the forth number there, outside of the brackets with all the other numbers in it is your Orientation.

Then save your new script under the old name of the original script as a .nss file and compile, before putting it in your override, next time you enter the module you should see your NPC standing where you told it to. I hope this works for ya!

Myster
10-27-2005, 05:53 AM
Ok. well thx for attempting to help me out but i dont understand scripts ( i should as i do computer programing at school ) but i dont. anyway i still havent figured out the problem im having BUT through trial and error in the last 2hours i figured out how to add NPCs into the game. kinda different to the tutorial but yea i spose i have to lern to do scripts sooner or l8ter but theres meny threads to help me out. okwell thx ive figured out what i needed to do for what im thinking.

thx for trying to help me. im sure soon ill realise what your talking about.

cheers