Creates a one-shot MIT timer.
mk1MIT(MK1_MIT_ONESHOT, {seconds}
, {ident}
, {callback}
);
xiIMP_Send("", "_fw:mit", 0, "", {ident}
, ["o", {seconds}
], {callback}
);
Parameter | Value |
---|---|
{seconds} |
float seconds until trigger broadcast. Valid values: 0.00001 to max float. Values below 0.2 are clamped to 0.2. |
{ident} |
integer returned with trigger broadcast. |
{callback} |
string returned with trigger broadcast. This value is also used to cancel a MIT timer using a c request. Valid values: 0 to 1024 characters (any). |
This request causes the MIT interface to send a single trigger broadcast after {seconds}
seconds. Once the timer triggers, it is automatically removed. Unlike llSetTimerEvent, a single script can send multiple such requests to the MIT interface and have multiple timers running simultaneously.
{ident}
and {callback}
do not need to be unique among all software; the trigger broadcast will be sent directly to the script that created the MIT timer when using the user-defined imp_message(...) function.
{ident}
and {callback}
should not be considered private or secure, since scripts can still listen to raw link messages and spoof IMP messages from other scripts.The MIT interface only responds if an error occurs when processing the request.
Parameter | Value |
---|---|
prim | UUID of root prim. |
target | Name of requesting script. |
signed | "" |
status | One of the following:
Other values may be added in the future. |
ident | {ident} |
params | ["o", {seconds} ] |
data | {callback} |
linknum | 1 |
source | "_fw:mit" |
Error handling is recommended but optional for this request.
Software should check that source is "_fw:mit", target is llGetScriptName(), and status starts with "err:". If so, the script should identify the requested timer with the ident, params, and data values, then handle the error as desired.