mirror of
https://github.com/SWG-Source/dsrc.git
synced 2026-08-01 01:15:59 -04:00
27 lines
699 B
Plaintext
27 lines
699 B
Plaintext
/***** INCLUDES ********************************************************/
|
|
include library.utils;
|
|
|
|
/***** TRIGGERS ********************************************************/
|
|
|
|
trigger OnAttach()
|
|
{
|
|
setBaseWalkSpeed(self, 6.0f);
|
|
setHibernationDelay(self, 5.0f * 24.0f * 60.0f * 60.0f); // 5 days
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
trigger OnHibernateBegin()
|
|
{
|
|
if( !utils.hasScriptVar(self, "intCleanedUp") )
|
|
{
|
|
utils.setScriptVar(self, "intCleanedUp", 1);
|
|
obj_id objParent = getObjIdObjVar(self, "objParent");
|
|
float fltRespawnTime = getFloatObjVar(self, "fltRespawnTime");
|
|
messageTo(objParent, "spawnDestroyed", null, fltRespawnTime, false);
|
|
}
|
|
|
|
destroyObject(self);
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|