Hi All,
I know this is old news probably, but I wanted to post this for the community anyway.
As some of us know the problem with a party of multiple henchman especially one with a rogue is that the AI in NWN causes the rogue to pick the lock and the others mele henchman to attack it.
I wrote a script to stop the behavior of the melee unit only when a rogue is in the party.
So basically the rogue can pick the lock with out interference from the other members.
It attaches to the click event of the locked object.
Here it is its for a pary of 3 henchman. Modify it to your hearts content.
void main()
{
object oPC = GetFirstPC();
object oHenchman1 = GetHenchman(oPC,1);
object oHenchman2 = GetHenchman(oPC,2);
object oHenchman3 = GetHenchman(oPC,3);
if ((GetclassByPosition(1,oHenchman1) == class_TYPE_ROGUE && oHenchman1 != OBJECT_INVALID) ||
(GetclassByPosition(1,oHenchman2) == class_TYPE_ROGUE && oHenchman2 != OBJECT_INVALID) ||
(GetclassByPosition(1,oHenchman3) == class_TYPE_ROGUE && oHenchman3 != OBJECT_INVALID))
{
if (GetclassByPosition(1,oHenchman1) != class_TYPE_ROGUE)
{
DelayCommand(2.0,AssignCommand(oHenchman1,ClearAllActions()));
}
if (GetclassByPosition(1,oHenchman2) != class_TYPE_ROGUE)
{
DelayCommand(2.0,AssignCommand(oHenchman2,ClearAllActions()));
}
if (GetclassByPosition(1,oHenchman3) != class_TYPE_ROGUE)
{
DelayCommand(2.0,AssignCommand(oHenchman3,ClearAllActions()));
}
}
}
As you can see the possiblities for manipulation are endless this works for my upcomming game/
Regards,
Calva64
Modifié par Calva64, 03 mars 2012 - 10:42 .