Initial commit
Adding all of the current content for Anphillia Unlimited.
This commit is contained in:
43
_module/nss/cnr_skin_ondeath.nss
Normal file
43
_module/nss/cnr_skin_ondeath.nss
Normal file
@@ -0,0 +1,43 @@
|
||||
/////////////////////////////////////////////////////////
|
||||
//
|
||||
// Craftable Natural Resources (CNR) by Festyx
|
||||
//
|
||||
// Name: cnr_skin_ondeath
|
||||
//
|
||||
// Desc: The OnDeath handler for skinnable animals.
|
||||
//
|
||||
// Author: David Bobeck 18Feb03
|
||||
//
|
||||
/////////////////////////////////////////////////////////
|
||||
#include "cnr_config_inc"
|
||||
|
||||
void FadeCorpse()
|
||||
{
|
||||
object oBones = GetLocalObject(OBJECT_SELF, "CnrCorpseBones");
|
||||
if (GetIsObjectValid(oBones))
|
||||
{
|
||||
DeleteLocalObject(OBJECT_SELF, "CnrCorpseBones");
|
||||
DestroyObject(oBones);
|
||||
}
|
||||
DestroyObject(OBJECT_SELF);
|
||||
}
|
||||
|
||||
void main()
|
||||
{
|
||||
string sDeathScript = GetLocalString(OBJECT_SELF, "PAT_post_cnr_skin_ondeath");
|
||||
if (sDeathScript == "")
|
||||
sDeathScript = "nw_c2_default7";
|
||||
ExecuteScript(sDeathScript , OBJECT_SELF);
|
||||
|
||||
location locDeath = GetLocation(OBJECT_SELF);
|
||||
object oCorpse = CreateObject(OBJECT_TYPE_PLACEABLE, "cnrcorpseskin", locDeath, FALSE);
|
||||
object oBones = CreateObject(OBJECT_TYPE_PLACEABLE, "cnrcorpsebones", locDeath, FALSE);
|
||||
|
||||
SetObjectVisualTransform(oCorpse, OBJECT_VISUAL_TRANSFORM_SCALE, 1.5);
|
||||
SetObjectVisualTransform(oBones, OBJECT_VISUAL_TRANSFORM_SCALE, 1.5);
|
||||
|
||||
SetLocalObject(oCorpse, "CnrCorpseBones", oBones);
|
||||
SetLocalString(oCorpse, "CnrCorpseType", GetTag(OBJECT_SELF));
|
||||
|
||||
AssignCommand(oCorpse, DelayCommand(CNR_FLOAT_SKINNABLE_CORPSE_FADE_TIME_SECS, FadeCorpse()));
|
||||
}
|
||||
Reference in New Issue
Block a user