void foo(object oPC, float fDelay = 60.0f)
{
if(!GetIsValid(oPC))
{
DelayCommand(fDelay, foo(oPC));
}
else
*your code to reinstate the pc
}
Since the delay is predefined in the method parameters, the call to foo only needs to have the object oPC passed to it. This would be an include to whatever method you use.
Alternately, should you perform the above routine by using an "ExecuteScript" method from your script, the following would be an example
//foo.nss
void main()
{
oPC = OBJECT_SELF;
if(!GetIsValid(oPC))
{
DelayCommand(60.0f, ExecuteScript(oPC, "foo"));
}
else
*your code to reinstate the pc
}
This second option does not directly allow you to set the delay interval unless you set up some local variable you can retrieve from the script by adding code and modifying the delay t the retrieved local.
I did this w/o reference material and w/o using a text editor so forgive any missed semi colons or other minor stuff.