30 lines
888 B
Plaintext
30 lines
888 B
Plaintext
//69_oe_attckmastr
|
|
// This is a template script for a henchman to attack their PC master
|
|
// Replace NPC_TAG with the TAG of the NPC Henchman to attack
|
|
// Place in the On Enter event of trigger or script can be modified to satisfy other
|
|
// event type.
|
|
|
|
#include "x0_i0_henchman"
|
|
#include "69_hench_lib"
|
|
|
|
void main()
|
|
{
|
|
object oPC = GetEnteringObject();
|
|
object oHench = GetObjectByTag("NPC_TAG");
|
|
|
|
if(GetMaster(oHench) == oPC)
|
|
{
|
|
oPC = GetMaster(oHench);
|
|
SetLootable(oHench, TRUE);
|
|
SetLastMaster(oPC, oHench);
|
|
RemoveHenchman(oPC, oHench);
|
|
AssignCommand(oHench, SpeakString("Die Scum!", TALKVOLUME_SHOUT));
|
|
//AssignCommand(oHench, ActionMoveToObject(oPC, TRUE, 0.5f));
|
|
ChangeToStandardFaction(oHench, STANDARD_FACTION_HOSTILE);
|
|
AssignCommand(oHench, SetIsEnemy(oPC));
|
|
AssignCommand(oHench, ActionAttack(oPC));
|
|
}
|
|
|
|
DestroyObject(OBJECT_SELF);
|
|
}
|