I use this for my spiders webs ..put it ondeath and make sure resref and tag are the same .Found it on the vault I think.
void RespawnObject(string sResRef, int iType, location lLoc) {
CreateObject(iType, sResRef, lLoc);
}
void main()
{
string sResRef = GetResRef(OBJECT_SELF);
int iType = GetObjectType(OBJECT_SELF);
// For creatures, save the location at spawn-time as a local location and
// use it instead. Otherwise, the creature will respawn where it died.
// No changes are required for placeables as they do not move (usually ;-)
location lLoc =GetLocation(OBJECT_SELF);
float fDelay = 10.0; // 5 minute delay; adjust as desired
AssignCommand(GetModule(), DelayCommand(fDelay, RespawnObject(sResRef, iType, lLoc)));
}
Oh shoot just realize you are respawning loot and not the container...
Modifié par Knight_Shield, 05 août 2010 - 05:28 .