//Firestarter script May 2003 //exit script for respawning ground trap trigger //makes respawning more reliable //groundtrap_exit //function to respawn trap void CreateTrap(string sTrap,location lTrap) { CreateObject(OBJECT_TYPE_PLACEABLE,sTrap,lTrap); } void main() { object oTrap=GetNearestObjectByTag("Trapme"); effect eKillTrap=EffectDamage(200); string sTrap=GetResRef(oTrap); location lTrap=GetLocation(oTrap); //if trap has been disarmed then respawn it in 60.0 (one minute) if(!GetIsTrapped(oTrap) &&GetDistanceToObject(oTrap)<3.0 &&GetPlotFlag(oTrap)==TRUE) { //SendMessageToPC(GetFirstPC(),"no trap .."); SetPlotFlag(oTrap,FALSE); //change the 55.0 and 60.0 (keep ~5 secs between) to alter //the respawn time. DelayCommand(55.0,ApplyEffectToObject(DURATION_TYPE_INSTANT, eKillTrap,oTrap)); DelayCommand(60.0,CreateTrap(sTrap,lTrap)); } }