Jump to content

Home

Change Faction Script help, please


Seamhainn

Recommended Posts

Hello!

 

I have this script which is fired with a Trigger:

#include "k_inc_generic"
void main(){

object oNPC1 = GetObjectByTag("kas25_lewbacca");
object oNPC2 = GetObjectByTag("kas25_katarn_01");
object oNPC3 = GetObjectByTag("kas25_katarn_02");
object oNPC4 = GetObjectByTag("kas25_katarn_03");

ChangeToStandardFaction(GetObjectByTag ("kas25_lewbacca"), 2);
ChangeToStandardFaction(GetObjectByTag ("kas25_katarn_01"), 4);
ChangeToStandardFaction(GetObjectByTag ("kas25_katarn_02"), 4);
ChangeToStandardFaction(GetObjectByTag ("kas25_katarn_03"), 4);

AssignCommand(oNPC1, GN_DetermineCombatRound());
AssignCommand(oNPC2, GN_DetermineCombatRound());
AssignCommand(oNPC3, GN_DetermineCombatRound());
AssignCommand(oNPC4, GN_DetermineCombatRound());

}

With another Trigger I want to change

a) the Faction of Lewbacca to Neutral and the Faction of the Katarns to Hostile

and

b) the boxes for No Permanent Death and Minimum 1 HP in each of the respective .utc unticked

so the PC can help Lewbacca fighting the Katarns.

 

Thanks for any help!

Link to comment
Share on other sites

Hello!

 

I have this script which is fired with a Trigger:

#include "k_inc_generic"
void main(){

object oNPC1 = GetObjectByTag("kas25_lewbacca");
object oNPC2 = GetObjectByTag("kas25_katarn_01");
object oNPC3 = GetObjectByTag("kas25_katarn_02");
object oNPC4 = GetObjectByTag("kas25_katarn_03");

ChangeToStandardFaction(GetObjectByTag ("kas25_lewbacca"), 2);
ChangeToStandardFaction(GetObjectByTag ("kas25_katarn_01"), 4);
ChangeToStandardFaction(GetObjectByTag ("kas25_katarn_02"), 4);
ChangeToStandardFaction(GetObjectByTag ("kas25_katarn_03"), 4);

AssignCommand(oNPC1, GN_DetermineCombatRound());
AssignCommand(oNPC2, GN_DetermineCombatRound());
AssignCommand(oNPC3, GN_DetermineCombatRound());
AssignCommand(oNPC4, GN_DetermineCombatRound());

}

With another Trigger I want to change

a) the Faction of Lewbacca to Neutral and the Faction of the Katarns to Hostile

and

b) the boxes for No Permanent Death and Minimum 1 HP in each of the respective .utc unticked

so the PC can help Lewbacca fighting the Katarns.

 

Thanks for any help!

 

I think this script should work

 



void main(){

object oNPC1 = GetObjectByTag("kas25_lewbacca");
object oNPC2 = GetObjectByTag("kas25_katarn_01");
object oNPC3 = GetObjectByTag("kas25_katarn_02");
object oNPC4 = GetObjectByTag("kas25_katarn_03");


ChangeToStandardFaction(oNPC1, 5);
ChangeToStandardFaction(oNPC2, 1);
ChangeToStandardFaction(oNPC3, 1);
ChangeToStandardFaction(oNPC4, 1);

SetMinOneHP(oNPC1,1);

}

 

Altought this script dosn't change Permanent Death.

Link to comment
Share on other sites

@sekan: I digged a bit into the existing .nss files and I assume it is:

 

SetMinOneHP(oNPC1, FALSE);

 

Though, as always, I might be wrong...

 

Also I want that, when the Trigger fires, there is a delay for the changing of the Factions so the player can lean back a little time and watch the fight between Lewbacca and the beasts. How can I do that?

 

Thanks for any help

Link to comment
Share on other sites

@sekan: I digged a bit into the existing .nss files and I assume it is:

 

 

 

Though, as always, I might be wrong...

 

Also I want that, when the Trigger fires, there is a delay for the changing of the Factions so the player can lean back a little time and watch the fight between Lewbacca and the beasts. How can I do that?

 

Thanks for any help

 

That script turns off min one hp.

Link to comment
Share on other sites

Hm, that is what I want to do?!

 

Ohh stupid me :xp:

 

 

Also I want that, when the Trigger fires, there is a delay for the changing of the Factions so the player can lean back a little time and watch the fight between Lewbacca and the beasts. How can I do that?

 

I think this script should work

 

void main(){

object oNPC1 = GetObjectByTag("kas25_lewbacca");
object oNPC2 = GetObjectByTag("kas25_katarn_01");
object oNPC3 = GetObjectByTag("kas25_katarn_02");
object oNPC4 = GetObjectByTag("kas25_katarn_03");


DelayCommand(5.0,ChangeToStandardFaction(oNPC1, 5));
ChangeToStandardFaction(oNPC2, 1);
ChangeToStandardFaction(oNPC3, 1);
ChangeToStandardFaction(oNPC4, 1);

SetMinOneHP(oNPC1,1);

}

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...