42 lines
1.2 KiB
Plaintext
42 lines
1.2 KiB
Plaintext
|
//::///////////////////////////////////////////////
|
||
|
//:: Name vamp_gas_form_hb
|
||
|
//:: Copyright (c) 2022 Project RATDOG
|
||
|
//:://////////////////////////////////////////////
|
||
|
/*
|
||
|
Make the Vampire's onDeath Gaseous Form flee
|
||
|
& vanish
|
||
|
*/
|
||
|
//:://////////////////////////////////////////////
|
||
|
//:: Created By: Jaysyn
|
||
|
//:: Created On: 20221207
|
||
|
//:://////////////////////////////////////////////
|
||
|
|
||
|
void main()
|
||
|
{
|
||
|
object oNPC = OBJECT_SELF;
|
||
|
location lSelf = GetLocation(oNPC);
|
||
|
|
||
|
object oAttacker = GetNearestCreature(CREATURE_TYPE_REPUTATION , REPUTATION_TYPE_ENEMY, oNPC, 1, CREATURE_TYPE_IS_ALIVE, TRUE);
|
||
|
|
||
|
string sResRef = GetResRef(oNPC);
|
||
|
|
||
|
|
||
|
//:: Set destroyable.
|
||
|
SetIsDestroyable(TRUE, FALSE, FALSE);
|
||
|
|
||
|
//:: Remove plot/immoral/lootable flags JUST in case.
|
||
|
SetPlotFlag(oNPC, TRUE);
|
||
|
SetImmortal(oNPC, FALSE);
|
||
|
SetLootable(oNPC, FALSE);
|
||
|
|
||
|
//:: Clear Actions & run away
|
||
|
//AssignCommand(oNPC, ClearAllActions());
|
||
|
ClearAllActions();
|
||
|
ActionMoveAwayFromObject(oAttacker, TRUE, 10.0f);
|
||
|
//DelayCommand(0.2f, ActionMoveAwayFromObject(oAttacker, TRUE, 10.0f));
|
||
|
|
||
|
//:: Destroy ourselves after fleeing the scene
|
||
|
DelayCommand(4.0f, DestroyObject(oNPC));
|
||
|
|
||
|
}
|