View Full Version : Warp scripting, help needed.
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.
08-04-2004, 10:40 AM
You should find everything you need here: http://www.lucasforums.com/showthread.php?s=&threadid=132045 :)
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.
08-04-2004, 10:21 PM
Glad I could help :)
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.
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???
you'll get a cookie
08-05-2004, 03:35 AM
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;
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
location locNPC1=Location(vecNPC1, d);
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
location locNPC2=Location(vecNPC2, h);
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
location locNPC3=Location(vecNPC3, l);
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! :D
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:
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
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??
08-05-2004, 08:43 AM
Fighting with their fists huh?
Kung-Fu Sith! :D
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.
08-05-2004, 09:54 AM
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.
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.
08-05-2004, 04:54 PM
Check you pms :)
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.
vBulletin®, Copyright ©2000-2015, Jelsoft Enterprises Ltd.