41 lines
1.3 KiB
Plaintext
41 lines
1.3 KiB
Plaintext
void main()
|
|
{
|
|
object oTarget;
|
|
effect eVFX;
|
|
object oActor;
|
|
object oSelf = OBJECT_SELF;
|
|
|
|
// Get the creature who triggered this event.
|
|
object oPC = GetEnteringObject();
|
|
|
|
// Only fire for (real) PCs.
|
|
if ( !GetIsPC(oPC) || GetIsDMPossessed(oPC) )
|
|
return;
|
|
|
|
// Only fire once.
|
|
if ( GetLocalInt(GetModule(), "DO_ONCE__" + GetTag(OBJECT_SELF)) )
|
|
return;
|
|
SetLocalInt(GetModule(), "DO_ONCE__" + GetTag(OBJECT_SELF), TRUE);
|
|
|
|
// Have the PC perform a sequence of actions.
|
|
AssignCommand(oPC, ClearAllActions());
|
|
|
|
// Have "Hisvin2" say something.
|
|
AssignCommand(GetObjectByTag("Hisvin2"), SpeakString("Damn you all for ruining my plans!"));
|
|
|
|
// Have "Hisvin2" cast Choking Powder.
|
|
oActor = GetObjectByTag("hisChest2");
|
|
DelayCommand(2.0, AssignCommand(oActor, ActionCastSpellAtObject(SPELL_GRENADE_CHOKING, oPC, METAMAGIC_ANY, TRUE, 0, PROJECTILE_PATH_TYPE_DEFAULT, TRUE)));
|
|
|
|
// Destroy an object (not fully effective until this script ends).
|
|
|
|
eVFX = EffectVisualEffect(VFX_FNF_SUMMON_MONSTER_2);
|
|
oTarget = GetObjectByTag("Hisvin2");
|
|
DelayCommand(3.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVFX, oTarget));
|
|
DelayCommand(3.0, DestroyObject(oTarget, 3.0));
|
|
|
|
DelayCommand(6.0, DestroyObject(OBJECT_SELF));
|
|
|
|
}
|
|
|