Jacob Dakari Posted April 4, 2008 Share Posted April 4, 2008 Ok, so I've gone through the tutorials, and everything has been working out beautifully, except that I can't get the NPC to spawn in the place that I want her to spawn before I recruit her. I tried using several different scripts, but when I did, it said error on whatever part of the script. That's just my luck too, I'm near completion of the mod, and I fail because I'm too ADD to actually type the script in correctly (no doubt that's what I did, I probably added stuff from the tut that wasn't supposed to be there ) but I just wanted to see if there was an easier script that I could use to spawn her... Link to comment Share on other sites More sharing options...
Ferc Kast Posted April 4, 2008 Share Posted April 4, 2008 This script should do the trick for you. void main() { vector vPosition=Vector(0.0, 0.0, 0.0); //X, Y, Z coordinates location lWhereToSpawn=Location(vPosition,0.0); //Orientation, I believe CreateObject( OBJECT_TYPE_CREATURE, "my_character",lWhereToSpawn);} You can find the X, Y, Z coordinates through the whereami cheat code in K1 or Glovemaster's FindMe power from his Handy Force Powers (2.0) mod for TSL. Link to comment Share on other sites More sharing options...
Jacob Dakari Posted April 4, 2008 Author Share Posted April 4, 2008 The ",WheretoSpawn" what is that? Link to comment Share on other sites More sharing options...
LiquidZoo Posted April 4, 2008 Share Posted April 4, 2008 The ",WheretoSpawn" what is that? lWheretoSpawn is the variable name used in the script example above. (that's a lowercase L, and a capital W) Link to comment Share on other sites More sharing options...
Jacob Dakari Posted April 4, 2008 Author Share Posted April 4, 2008 @Ferc... That script didn't work either... I'm seriously thinking that it maybe that my computer is retarded and can only script once. Link to comment Share on other sites More sharing options...
Marius Fett Posted April 4, 2008 Share Posted April 4, 2008 Try this: void main() { CreateObject(OBJECT_TYPE_CREATURE, "resref", Location(Vector(X.XX,4Y.YY,Z.ZZ), R.RR)); } Replace X.XX, Y.YY and Z.ZZ with the X,Y,Z co-ordinates respectively, the R.RR with the orientation and the resref with your NPC's resref. Link to comment Share on other sites More sharing options...
Jacob Dakari Posted April 4, 2008 Author Share Posted April 4, 2008 What is orientation? Link to comment Share on other sites More sharing options...
Marius Fett Posted April 4, 2008 Share Posted April 4, 2008 Orientation is the direction which the NPC, Placeable or whatever the object/creature you're spawning faces. Here are the basic directions and their corresponding numbers, though you can experiment and use numbers in between to be more precise: North: 0.00 East: 90.00 South: 180.00 West: 270.00 -DDD Link to comment Share on other sites More sharing options...
glovemaster Posted April 4, 2008 Share Posted April 4, 2008 So orientation is basically a bearing (or angle) 0-360 degrees Link to comment Share on other sites More sharing options...
Jacob Dakari Posted April 4, 2008 Author Share Posted April 4, 2008 Thanks, I always use 0.00 but basically because I had no clue what it was. ^_^ Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.