generated from Jaysyn/ModuleTemplate
Initial Commit
Initial Commit.
This commit is contained in:
30
_module/nss/death.nss
Normal file
30
_module/nss/death.nss
Normal file
@@ -0,0 +1,30 @@
|
||||
/* Script generated by
|
||||
Lilac Soul's NWN Script Generator, v. 1.6
|
||||
|
||||
For download info, please visit:
|
||||
http://www.lilacsoul.revility.com */
|
||||
|
||||
//Goes on creature's OnHeartbeat. Fires when not fighting or talking.
|
||||
void main()
|
||||
{
|
||||
|
||||
object oPC = GetNearestCreature(CREATURE_TYPE_PLAYER_CHAR, PLAYER_CHAR_IS_PC, OBJECT_SELF, 1, CREATURE_TYPE_PERCEPTION, PERCEPTION_SEEN);
|
||||
|
||||
if (IsInConversation(OBJECT_SELF) || GetIsInCombat()) return;
|
||||
|
||||
int DoOnce = GetLocalInt(OBJECT_SELF, GetTag(OBJECT_SELF));
|
||||
|
||||
if (DoOnce==TRUE) return;
|
||||
|
||||
SetLocalInt(OBJECT_SELF, GetTag(OBJECT_SELF), TRUE);
|
||||
|
||||
object oTarget;
|
||||
oTarget = OBJECT_SELF;
|
||||
|
||||
effect eEffect;
|
||||
eEffect = EffectDeath();
|
||||
|
||||
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eEffect, oTarget);
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user