Jump to content

Home

NPCs Hostile after Dialouge Choice


LDR

Recommended Posts

Story: In my prison ship mod, you speak to an iridonian prisoner that suggests a prison break...

 

Lets say I access a terminal called pri_cellterm and after a certain dialouge coice, the doors called pri_field open, and when they open, the pri_guard and pri_guardcap become hostile. Can someone make an example of how to make this script?

Link to comment
Share on other sites

You could put this script on the OnOpen script line for your door:

 

void main() {
object oObject1 = GetObjectByTag("tag of guard capt");
object oObject2 = GetObjectByTag("tag of guard");
ChangeToStandardFaction(oObject1, 1);
ChangeToStandardFaction(oObject2,1);

}

 

That should work, I'm not the best script writer......

Link to comment
Share on other sites

Thank you so very much. One last thing. If you betray the iridonian that suggested the prison break, you tell the Guard Captain what the iridonian tried to make you do. What script do I make to make the iridonian dissapear from the module permanently when i hit that dialouge option?

Link to comment
Share on other sites

void main() {
// make main NPC go hostile
object oNPC=GetObjectByTag("npc_tag");
ChangeToStandardFaction(oNPC, 1);

// and if there are any thugs to fight...
object oThug1 = GetObjectByTag("npc1_tag");
object oThug2 = GetObjectByTag("npc2_tag");
object oThug3 = GetObjectByTag("npc3_tag");

// make them hostile    
ChangeToStandardFaction(oThug1, 1);
ChangeToStandardFaction(oThug2, 1);
ChangeToStandardFaction(oThug3, 1);

// give them kick to make them start attacking you
ExecuteScript("k_ai_master",oNPC,1005);
}

 

That should show you what to do. Hah.

Link to comment
Share on other sites

Try this one...I got this one from DarthStoney

 

void sub1(string stringParam1) {
int int1 = 0;
object object1 = GetObjectByTag(stringParam1, int1);
while (GetIsObjectValid(object1)) {
	ChangeToStandardFaction(object1, 1);
	object1 = GetObjectByTag(stringParam1, (int1++));
}
}

void main() {
sub1("tag of first group of npcs");
            sub1("tag of second group of npcs");
}

 

Just add additional sub1's after the void main() function for each group of npc that have the same tag in a module.

Link to comment
Share on other sites

And then I just add

void main() {
object oObject1 = GetObjectByTag("pri_guardcapt");
object oObject2 = GetObjectByTag("pri_meddrd");
object oObject3 = GetObjectByTag("pri_maindrd");
ChangeToStandardFaction(oObject1, 1);
ChangeToStandardFaction(oObject2, 1);
ChangeToStandardFaction(oObject3, 1);

}

 

directly under it?

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...