Jump to content

Home

[K1] I need a script


sekan

Recommended Posts

Hi,

 

I need a script that makes 7 npcs run to another place in the module.

 

I would guess you'll need something like this in the beginning

void main()
{
object oNPC1=GetObjectByTag("sith_mast");
object oNPC2=GetObjectByTag("sith_apr01");
object oNPC3=GetObjectByTag("sith_apr02");
object oNPC4=GetObjectByTag("sith_heavy01");
object oNPC5=GetObjectByTag("sith_heavy02");
object oNPC6=GetObjectByTag("sith_sol01");
object oNPC7=GetObjectByTag("sith_sol02");




}

Link to comment
Share on other sites

If you want each NPC to run to the exact same spot, then your script would be something like this.

 

void main()
{
object oNPC1=GetObjectByTag("sith_mast");
object oNPC2=GetObjectByTag("sith_apr01");
object oNPC3=GetObjectByTag("sith_apr02");
object oNPC4=GetObjectByTag("sith_heavy01");
object oNPC5=GetObjectByTag("sith_heavy02");
object oNPC6=GetObjectByTag("sith_sol01");
object oNPC7=GetObjectByTag("sith_sol02");

vector aPosition=Vector(100.0,100.0,0.0);
location lBla=Location(aPosition,0.0);

AssignCommand (oNPC1,ActionForceMoveToLocation(lBla,TRUE));
AssignCommand (oNPC2,ActionForceMoveToLocation(lBla,TRUE));
AssignCommand (oNPC3,ActionForceMoveToLocation(lBla,TRUE));
AssignCommand (oNPC4,ActionForceMoveToLocation(lBla,TRUE));
AssignCommand (oNPC5,ActionForceMoveToLocation(lBla,TRUE));
AssignCommand (oNPC6,ActionForceMoveToLocation(lBla,TRUE));
AssignCommand (oNPC7,ActionForceMoveToLocation(lBla,TRUE));
}

 

Just change the coordinates to match your location.

Link to comment
Share on other sites

If you want each NPC to run to the exact same spot, then your script would be something like this.

 

void main()
{
object oNPC1=GetObjectByTag("sith_mast");
object oNPC2=GetObjectByTag("sith_apr01");
object oNPC3=GetObjectByTag("sith_apr02");
object oNPC4=GetObjectByTag("sith_heavy01");
object oNPC5=GetObjectByTag("sith_heavy02");
object oNPC6=GetObjectByTag("sith_sol01");
object oNPC7=GetObjectByTag("sith_sol02");

vector aPosition=Vector(100.0,100.0,0.0);
location lBla=Location(aPosition,0.0);

AssignCommand (oNPC1,ActionForceMoveToLocation(lBla,TRUE));
AssignCommand (oNPC2,ActionForceMoveToLocation(lBla,TRUE));
AssignCommand (oNPC3,ActionForceMoveToLocation(lBla,TRUE));
AssignCommand (oNPC4,ActionForceMoveToLocation(lBla,TRUE));
AssignCommand (oNPC5,ActionForceMoveToLocation(lBla,TRUE));
AssignCommand (oNPC6,ActionForceMoveToLocation(lBla,TRUE));
AssignCommand (oNPC7,ActionForceMoveToLocation(lBla,TRUE));
}

 

Just change the coordinates to match your location.

 

Thanks but i need them to run to different spots.

Link to comment
Share on other sites

It always helps to be as descriptive as possible in your initial post.

 

Anyways, the script would be something like this;

 

void main()
{
object oNPC1=GetObjectByTag("sith_mast");
object oNPC2=GetObjectByTag("sith_apr01");
object oNPC3=GetObjectByTag("sith_apr02");
object oNPC4=GetObjectByTag("sith_heavy01");
object oNPC5=GetObjectByTag("sith_heavy02");
object oNPC6=GetObjectByTag("sith_sol01");
object oNPC7=GetObjectByTag("sith_sol02");

vector aPosition=Vector(100.0,100.0,0.0);
location lBla=Location(aPosition,0.0);

vector bPosition=Vector(100.0,100.0,0.0);
location lBla2=Location(bPosition,0.0);

vector cPosition=Vector(100.0,100.0,0.0);
location lBla3=Location(cPosition,0.0);

vector dPosition=Vector(100.0,100.0,0.0);
location lBla4=Location(dPosition,0.0);

vector ePosition=Vector(100.0,100.0,0.0);
location lBla5=Location(ePosition,0.0);

vector fPosition=Vector(100.0,100.0,0.0);
location lBla6=Location(fPosition,0.0);

vector gPosition=Vector(100.0,100.0,0.0);
location lBla7=Location(gPosition,0.0);

AssignCommand (oNPC1,ActionForceMoveToLocation(lBla,TRUE));
AssignCommand (oNPC2,ActionForceMoveToLocation(lBla2,TRUE));
AssignCommand (oNPC3,ActionForceMoveToLocation(lBla3,TRUE));
AssignCommand (oNPC4,ActionForceMoveToLocation(lBla4,TRUE));
AssignCommand (oNPC5,ActionForceMoveToLocation(lBla5,TRUE));
AssignCommand (oNPC6,ActionForceMoveToLocation(lBla6,TRUE));
AssignCommand (oNPC7,ActionForceMoveToLocation(lBla7,TRUE));
}

Again, replace the coordinates for each position with your own.

Link to comment
Share on other sites

It always helps to be as descriptive as possible in your initial post.

 

Anyways, the script would be something like this;

 

void main()
{
object oNPC1=GetObjectByTag("sith_mast");
object oNPC2=GetObjectByTag("sith_apr01");
object oNPC3=GetObjectByTag("sith_apr02");
object oNPC4=GetObjectByTag("sith_heavy01");
object oNPC5=GetObjectByTag("sith_heavy02");
object oNPC6=GetObjectByTag("sith_sol01");
object oNPC7=GetObjectByTag("sith_sol02");

vector aPosition=Vector(100.0,100.0,0.0);
location lBla=Location(aPosition,0.0);

vector bPosition=Vector(100.0,100.0,0.0);
location lBla2=Location(bPosition,0.0);

vector cPosition=Vector(100.0,100.0,0.0);
location lBla3=Location(cPosition,0.0);

vector dPosition=Vector(100.0,100.0,0.0);
location lBla4=Location(dPosition,0.0);

vector ePosition=Vector(100.0,100.0,0.0);
location lBla5=Location(ePosition,0.0);

vector fPosition=Vector(100.0,100.0,0.0);
location lBla6=Location(fPosition,0.0);

vector gPosition=Vector(100.0,100.0,0.0);
location lBla7=Location(gPosition,0.0);

AssignCommand (oNPC1,ActionForceMoveToLocation(lBla,TRUE));
AssignCommand (oNPC2,ActionForceMoveToLocation(lBla2,TRUE));
AssignCommand (oNPC3,ActionForceMoveToLocation(lBla3,TRUE));
AssignCommand (oNPC4,ActionForceMoveToLocation(lBla4,TRUE));
AssignCommand (oNPC5,ActionForceMoveToLocation(lBla5,TRUE));
AssignCommand (oNPC6,ActionForceMoveToLocation(lBla6,TRUE));
AssignCommand (oNPC7,ActionForceMoveToLocation(lBla7,TRUE));
}

Again, replace the coordinates for each position with your own.

 

 

Thanks :D

 

Sorry i didn't mean to sound negative.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...