14 lines
486 B
Plaintext
14 lines
486 B
Plaintext
//OnDeath
|
|
void RespawnMe(string sResRef, location lLocation, string sNewTag)
|
|
{
|
|
CreateObject(OBJECT_TYPE_PLACEABLE, sResRef, lLocation, FALSE, sNewTag);
|
|
}
|
|
void main()
|
|
{
|
|
float fSeconds = 500.0;//Set respawn time in seconds
|
|
string sMyResRef = GetResRef(OBJECT_SELF);
|
|
location lMyLocation = GetLocation(OBJECT_SELF);
|
|
string sMyTag = GetTag(OBJECT_SELF);
|
|
AssignCommand(GetArea(OBJECT_SELF), DelayCommand(fSeconds , RespawnMe(sMyResRef, lMyLocation, sMyTag)));
|
|
}
|