i need a little help...i think it's simple..
- I' ve a scripted object A that sends an email to another object B.
- The other object B receives the email and sends a response to A.
How to make this:
- If A doesn't receive the response will make a thing.
- If A receives the response will make another thing.
I think the best thing is to make a timeout event on A on receiving the response(for example 1-2 min)...can you suggest me how to code this timeout event?
Thanks in advance.
CODE
default
{
state_entry()
{
llSetTimerEvent(30);
}
timer()
{
llEmail((string)recipient,subject,message);
state waitcheck;
}
}
state waitcheck
{
state_entry()
{
llSetTimerEvent(30);
}
timer()
{
llGetNextEmail("", "responseOK");
}
email(string time, string address, string subj, string message, integer num_left)
{
message = llDeleteSubString(message, 0, llSubStringIndex(message, "\n\n") + 1);
if (subj == "responseOK")
{
llOwnerSay("Response OK");
state default;
}
}
}