Jump to content

Home

Warp scripting, help needed.


Mav

Recommended Posts

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

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

^^^^

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! :D

Link to comment
Share on other sites

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

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

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...