JuniorModder Posted November 17, 2009 Share Posted November 17, 2009 I am trying to recruit a custom character. I want to create him at a specific location when the PC enters the module. I did the warp band, and I don't understand any of it. Module: 502ond > 28.78271 > -33.75924 > 10.00148 > XOrientation: -0.24490 > YOrientation: -0.96955 > Bearing: -1.81821 Now, how do I spawn a character there? I did look through the forums!! I did try before posting, but I am very lost.. JuniorModder Link to comment Share on other sites More sharing options...
DarthStoney Posted November 17, 2009 Share Posted November 17, 2009 I am trying to recruit a custom character. I want to create him at a specific location when the PC enters the module. I did the warp band, and I don't understand any of it. Module: 502ond > 28.78271 x coordinates > -33.75924 y coordinates > 10.00148 z coordinates > XOrientation: -0.24490 > YOrientation: -0.96955 > Bearing: -1.81821 Now, how do I spawn a character there? I did look through the forums!! I did try before posting, but I am very lost.. JuniorModder here is a simple spawn script void main() { CreateObject(1, " [color="Red"]character.utc file[/color]", Location(Vector(28.78271, (-33.75924), 10.00148), [color="red"]character faceing direction in degrees[/color] 0-360), 0); } Link to comment Share on other sites More sharing options...
JuniorModder Posted November 17, 2009 Author Share Posted November 17, 2009 No dice.. Here is what I put: void main() { CreateObject(1, " p_tenneth ", Location(Vector(28.78271, (-33.75924), 10.00148), 0), 0); } And I can't get the script to compile!! Using kotortool, I get this error Lookup path root set to: C:\Program Files\LucasArt\SWKotOR2\ Loaded nwscript.nss from C:\Program Files\LucasArt\SWKotOR2\override/ Error: Unable to open input file "BLABLABLA..spwntent.txt" ??? JuniorModder Link to comment Share on other sites More sharing options...
DarthStoney Posted November 17, 2009 Share Posted November 17, 2009 do you have a copy of nwscripts.nss in your override folder? Just extract the one with Ktool into your override if you don't. Link to comment Share on other sites More sharing options...
JuniorModder Posted November 17, 2009 Author Share Posted November 17, 2009 I have it in my override, but it still screws up. JuniorModder Link to comment Share on other sites More sharing options...
DarthStoney Posted November 17, 2009 Share Posted November 17, 2009 The only think I can think of ,is do you have p_tenneth.utc in your override folder? Link to comment Share on other sites More sharing options...
JuniorModder Posted November 17, 2009 Author Share Posted November 17, 2009 Yea... Well maybe I'm doing something wrong in-game. Can I warp there and he will still spawn? JuniorModder Link to comment Share on other sites More sharing options...
ForeverNight Posted November 17, 2009 Share Posted November 17, 2009 No. Error: Unable to open input file "BLABLABLA..spwntent.txt" What is the EXACT name used there as opposed to BLABLABLA..spwntent.txt? Also, it's been awhile since I've done any scripting, but I'm pretty sure it should be spwntent.nss not .txt What script compiler are you using? KotOR Tool or what? Link to comment Share on other sites More sharing options...
JuniorModder Posted November 17, 2009 Author Share Posted November 17, 2009 Well I typed the code in txt, then tried to compile it. BLABLABLA is just the location of the file. Ya know "My Documents"? JuniorModder Link to comment Share on other sites More sharing options...
JuniorModder Posted November 17, 2009 Author Share Posted November 17, 2009 Well I typed the code in txt, then tried to compile it. BLABLABLA is just the location of the file. Ya know "My Documents"? JuniorModder Link to comment Share on other sites More sharing options...
DarthStoney Posted November 17, 2009 Share Posted November 17, 2009 Try this and see if it wil compile,aslo you have to execute the script from something in order for him to spawn,or you can edit the module .git file which he will be there without a script. void main() { CreateObject(OBJECT_TYPE_CREATURE, " p_tenneth ", Location(Vector(28.78271, (-33.75924), 10.00148), 0), 0); } Link to comment Share on other sites More sharing options...
JuniorModder Posted November 17, 2009 Author Share Posted November 17, 2009 aslo you have to execute the script from something in order for him to spawn,or you can edit the module .git file which he will be there without a script. \ I will try that, but first, how do I do that exactly? JuniorModder Link to comment Share on other sites More sharing options...
DarthStoney Posted November 18, 2009 Share Posted November 18, 2009 this may be of some help.http://lucasforums.com/showthread.php?t=185991&highlight=anatomy , you'll want to add your new character to the "Creatures list" of the .git file for your module. The easiest way is to copy an existing one and paste it as new and edit the x,y,and z coordnants. make sure to edit the TemplateResRef to match your character. Link to comment Share on other sites More sharing options...
ForeverNight Posted November 18, 2009 Share Posted November 18, 2009 However, if it's for a mod, scripts are so much nicer than .mod files. Anyway, try using KotOR Tool's built in Script Compilier as opposed to Notepad + NWNSC It's in the latest release prior to Fred's departure. If it's for a mod don't forget a SOURCE folder, save all your .nss files there, makes life easier Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.