View Full Version : Change Faction Script help, please
Seamhainn
01-23-2008, 01:03 PM
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!
Darth Balor
01-23-2008, 02:22 PM
I'll look into the permanent death thing. Also you can just use the same function to change the faction.
sekan
01-23-2008, 03:02 PM
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.
Seamhainn
01-24-2008, 01:38 AM
@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
sekan
01-24-2008, 03:01 AM
@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.
Seamhainn
01-24-2008, 03:04 AM
Hm, that is what I want to do?!
sekan
01-24-2008, 04:03 AM
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);
}
Seamhainn
01-24-2008, 02:00 PM
Just something of note which might be interesting for other modders, too: SetMinOneHP to FALSE also erases No Permanent Death!
Problem solved!
Take care
vBulletin®, Copyright ©2000-2013, Jelsoft Enterprises Ltd.