kdsphantom
10-18-2005, 03:48 PM
Hello,
I am trying to use this script to change the faction of a creature, after you talk to them, using the dialog to fire this script.
void main()
{
object oNPC= GetObjectByTag("n_devaronian01");
ChangeToStandardFaction(oNPC, 1);
SetMinOneHP(oNPC, TRUE);
//SetMaxHP(oNPC, TRUE); dunno syntax to heal guy//
AdjustAlignment( GetFirstPC(),ALIGNMENT_LIGHT_SIDE,5);
//ChangeToStandardFaction(OBJECT_SELF, STANDARD_FACTION_HOSTILE_1)
}
the 2nd line doesnt seem to change n_devaronian01 's faction to hostile to me and fight me, nor the 3rd line set him to min 1 hp. The script compiles, and fires after the dialog, I get the Light side points but doesnt seem to affect n_devaronian01. By tag means ResRef correct? As in n_devaronian01.utc
The last line, if, when I use Object_self it if I understand this right, changes my the PC faction to hostile with who i dunno, but when that line is active it does turn us hostile, and why I know line 3 doesnt work as i can kill him.
But I dont know why it does turn him hostile and line 2 and 3 dont work.
The middle line SetMaxHP, after the fight id like n_devaronian01 to be healed, but I dont know the syntax command.
Any help would be great ) thank you
kdsphantom
I am trying to use this script to change the faction of a creature, after you talk to them, using the dialog to fire this script.
void main()
{
object oNPC= GetObjectByTag("n_devaronian01");
ChangeToStandardFaction(oNPC, 1);
SetMinOneHP(oNPC, TRUE);
//SetMaxHP(oNPC, TRUE); dunno syntax to heal guy//
AdjustAlignment( GetFirstPC(),ALIGNMENT_LIGHT_SIDE,5);
//ChangeToStandardFaction(OBJECT_SELF, STANDARD_FACTION_HOSTILE_1)
}
the 2nd line doesnt seem to change n_devaronian01 's faction to hostile to me and fight me, nor the 3rd line set him to min 1 hp. The script compiles, and fires after the dialog, I get the Light side points but doesnt seem to affect n_devaronian01. By tag means ResRef correct? As in n_devaronian01.utc
The last line, if, when I use Object_self it if I understand this right, changes my the PC faction to hostile with who i dunno, but when that line is active it does turn us hostile, and why I know line 3 doesnt work as i can kill him.
But I dont know why it does turn him hostile and line 2 and 3 dont work.
The middle line SetMaxHP, after the fight id like n_devaronian01 to be healed, but I dont know the syntax command.
Any help would be great ) thank you
kdsphantom