Difference between revisions of "LlGetStartParameter"

From Second Life Wiki
Jump to navigation Jump to search
m (formatted example)
Line 9: Line 9:
|return_text=that is the script start/rez parameter.
|return_text=that is the script start/rez parameter.
|spec
|spec
|caveats
|caveats=
* The start parameter does not survive region restarts ({{Jira|2251}}) or region boarder crossings ({{Jira|3258}}).
|constants
|constants
|examples=
|examples=
Line 22: Line 23:
     {
     {
         integer i = llGetStartParameter();
         integer i = llGetStartParameter();
         if (i == 0)
         if (i)
         {
         {
             llOwnerSay("rezzed from inventory (or llRezObject with 0)");
             llOwnerSay("I was given the number " + (string)i + " when I was rezzed");
         }
         }
         else
         else
         {
         {
             llOwnerSay("I was given the number " + (string)i + " when I was rezzed");
             llOwnerSay("rezzed from inventory (or rezzed/loaded with 0)");
         }
         }
     }
     }

Revision as of 16:07, 18 October 2008

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 (2251) or region boarder crossings (3258).

Examples

<lsl> 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)");
       }
   }

}

</lsl>

See Also

Events

•  on_rez

Functions

•  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();