LlGetStartParameter: Difference between revisions

From Second Life Wiki
Jump to navigation Jump to search
Strife Onizuka (talk | contribs)
No edit summary
Tapple Gao (talk | contribs)
add reference to llRezObjectWithParams
 
(2 intermediate revisions by 2 users not shown)
Line 5: Line 5:
|func_footnote=
|func_footnote=
*If the script was loaded with [[llRemoteLoadScriptPin]] then that start parameter is returned.
*If the script was loaded with [[llRemoteLoadScriptPin]] then that start parameter is returned.
*If the containing object was rezzed by [[llRezObject]] or [[llRezAtRoot]] then the return is the [[on_rez]] parameter.
*If the containing object was rezzed by [[llRezObjectWithParams]] or [[llRezObject]] or [[llRezAtRoot]] then the return is the [[on_rez]] parameter.
*If the containing object was manually rezzed, by dragging from inventory, the start parameter is 0.
*If the containing object was manually rezzed, by dragging from inventory, the start parameter is 0.
|func_desc
|func_desc
Line 15: Line 15:
|constants
|constants
|examples=
|examples=
<lsl>
<source lang="lsl2">
default
default
{
{
Line 35: Line 35:
     }
     }
}
}
</lsl>
</source>
|helpers
|helpers
|also_functions=
|also_functions=
{{LSL DefineRow||[[llGetStartString]]|Modern alternative that allows passing even more data.}}
{{LSL DefineRow||[[llRemoteLoadScriptPin]]|Used to load a script into a remote prim}}
{{LSL DefineRow||[[llRemoteLoadScriptPin]]|Used to load a script into a remote prim}}
{{LSL DefineRow||[[llRezObject]]|Used to rez an object at the center of mass}}
{{LSL DefineRow||[[llRezObject]]|Used to rez an object at the center of mass}}

Latest revision as of 17:04, 30 March 2026

Summary

Function: integer llGetStartParameter( );
0.0 Forced Delay
10.0 Energy

Returns an integer that is the script start/rez parameter.

Caveats

  • The start parameter does not survive region restarts (SVC-2251) or region change (SVC-3258, crossing or teleport).
  • If the script is reset (using llResetScript or other means), the start parameter is set to 0.

Examples

default
{
    on_rez(integer param)
    {
        llOwnerSay("rezzed with the number " + (string)param);
    }
    state_entry()
    {
        integer i = llGetStartParameter();
        if (i)
        {
            llOwnerSay("I was given the number " + (string)i + " when I was rezzed");
        }
        else
        {
            llOwnerSay("rezzed from inventory (or rezzed/loaded with 0)");
        }
    }
}

See Also

Events

•  on_rez

Functions

•  llGetStartString Modern alternative that allows passing even more data.
•  llRemoteLoadScriptPin Used to load a script into a remote prim
•  llRezObject Used to rez an object at the center of mass
•  llRezAtRoot Used to rez an object at the root

Deep Notes

Signature

function integer llGetStartParameter();