mirror of
https://github.com/SWG-Source/dsrc.git
synced 2026-08-01 01:15:59 -04:00
48 lines
1.3 KiB
Plaintext
48 lines
1.3 KiB
Plaintext
/**********************************************************************
|
|
* Copyright (c)2000-2002 Sony Online Entertainment Inc.
|
|
* All Rights Reserved
|
|
*
|
|
* Title: <title>
|
|
* Description: <description>
|
|
* @author $Author:$
|
|
* @version $Revision:$
|
|
**********************************************************************/
|
|
|
|
|
|
/***** INCLUDES ********************************************************/
|
|
include library.utils;
|
|
|
|
/***** CONSTANTS *******************************************************/
|
|
|
|
|
|
/***** 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;
|
|
}
|
|
|
|
|
|
/***** MESSAGEHANDLERS *************************************************/
|
|
|
|
/***** COMMANDHANDLERS *************************************************/
|
|
|
|
/***** FUNCTIONS *******************************************************/
|
|
|