Mav Posted August 4, 2004 Share Posted August 4, 2004 I was just wondering if a script could be made to warp the PC to a specific part of a module by using the X, Y, Z coordinates that you can get using the whereami cheat? Thanks in Advance. Mav Link to comment Share on other sites More sharing options...
Darth333 Posted August 4, 2004 Share Posted August 4, 2004 You should find everything you need here: http://www.lucasforums.com/showthread.php?s=&threadid=132045 Link to comment Share on other sites More sharing options...
Mav Posted August 5, 2004 Author Share Posted August 5, 2004 Thanks a bunch Darth333 I had a feeling that you would be the first one to help, and I think I am going to use the script that you made that uses the way point, thanks again. Link to comment Share on other sites More sharing options...
Darth333 Posted August 5, 2004 Share Posted August 5, 2004 Glad I could help Link to comment Share on other sites More sharing options...
Mav Posted August 5, 2004 Author Share Posted August 5, 2004 If I ever get this finished, what with school and all I'll be sure you are the first to give it a BETA test beofre the release , oh and I might have more scripting questions, but I'll just post in this thread if I do, Thanks Again. Mav Link to comment Share on other sites More sharing options...
Mav Posted August 5, 2004 Author Share Posted August 5, 2004 Okay so I've seen the script that is used to spawn a NPC at a given point, but what I need is a script to spawn 3 NPCs at a given point, help anyone or I could just attach three of the spawn scripts to the dialogue instead, but I figure that a script that would spawn 3 NPCs would be easier, help anyone??? [bribe] you'll get a cookie [/bribe] Link to comment Share on other sites More sharing options...
RedHawke Posted August 5, 2004 Share Posted August 5, 2004 ^^^^ Mav, if you are spawning 3 NPC's you will need a seperate spawn point for each one (Each one is simply gotten with a whereami cheat), and then the code would look like this; void main() { float a=0.00f; //X Cordinate 1 float b=0.00f; //Y Cordinate 1 float c=0.00f; //Z Cordinate 1 float d=0.0f; // NPC Facing 1 vector vecNPC1=Vector(a,b,c); location locNPC1=Location(vecNPC1, d); object oNPC1=CreateObject(OBJECT_TYPE_CREATURE,"npc_taghere",locNPC1); float e=0.00f; //X Cordinate 2 float f=0.00f; //Y Cordinate 2 float g=0.00f; //Z Cordinate 2 float h=0.0f; // NPC Facing 2 vector vecNPC2=Vector(e,f,g); location locNPC2=Location(vecNPC2, h); object oNPC2=CreateObject(OBJECT_TYPE_CREATURE,"npc_taghere",locNPC2); float i=0.00f; //X Cordinate 3 float j=0.00f; //Y Cordinate 3 float k=0.00f; //Z Cordinate 3 float l=0.0f; // NPC Facing 3 vector vecNPC3=Vector(i,j,k); location locNPC3=Location(vecNPC3, l); object oNPC3=CreateObject(OBJECT_TYPE_CREATURE,"npc_taghere",locNPC3); } You can keep adding sections of the code to spawn more NPC's. Just be sure to keep the numbering conventions going with vecNPC, and locNPC, as well as the four floats for each NPC location. I hope this helps! Link to comment Share on other sites More sharing options...
Mav Posted August 5, 2004 Author Share Posted August 5, 2004 Thanks once again RedHawke, thanks to you and Darth333, with an all nighter and an heavy session of testing/work tommorrow my newest module may be out sooner than even I imagined hopefully by Sunday, I thought it would take a month...or two. Oh and as promised here is your cookie: [Homer] MMMmmmmMMMmmmm [/Homer] Edit: Oh and I was one step ahead of you RedHawke I already have my three locations for the NPCs, I'll let you and Darth333 BETA test it before final release....if I have the time Link to comment Share on other sites More sharing options...
Mav Posted August 5, 2004 Author Share Posted August 5, 2004 First of all the script works great and everybody spawns and everyon eis happy YEAAHHAHHAHHA..... okay it's late and I'm getting delusional, okay I don't want to spoil anything, but although I have made sure that certain NPCs have lightsabers in there equipped item list, when you go to fight them they don't use lightsabers they decide to fight you with their fists any idea as to why?? Link to comment Share on other sites More sharing options...
RedHawke Posted August 5, 2004 Share Posted August 5, 2004 ^^^^ Fighting with their fists huh? Kung-Fu Sith! That sounds like you need to check the combat script settings in the .utc files for the spawned NPC's, for simplicity you should clone the scripts used by other dark jedi in the game. Link to comment Share on other sites More sharing options...
Darth333 Posted August 5, 2004 Share Posted August 5, 2004 You can also attach a script to dialog to make them florish their sabers. Unfortunately i don't have nwscript with me right now to get the proper syntax and functions so try using Redhawke's method. Link to comment Share on other sites More sharing options...
Mav Posted August 5, 2004 Author Share Posted August 5, 2004 Thanks for the help both of you, I think that you two should send me a PM with your e-mail so I can send you the BETA version of my new "module" so you can test it, well at least Darth333, I already have RedHawke's e-mail. Link to comment Share on other sites More sharing options...
Darth333 Posted August 5, 2004 Share Posted August 5, 2004 Check you pms Link to comment Share on other sites More sharing options...
Mav Posted August 5, 2004 Author Share Posted August 5, 2004 Got it and I sent you the BETA version let me know what you think a.s.a.p. because after Saturday I wont be able to work on it. Heck I wont even be near a computer for two weeks after Saturday. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.