OsMakeNotecard

From OpenSimulator

(Difference between revisions)
Jump to: navigation, search
m
m (XEngine to OSSL)
 
(11 intermediate revisions by 7 users not shown)
Line 1: Line 1:
{| width="100%" style="border: thin solid black"
+
{{osslfunc
| colspan="2" align="center" style=background:orange | '''{{SUBPAGENAME}}'''
+
|threat_level=High
|- valign="top"
+
|permissions=${OSSL|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER
|'''Threat Level''' || High
+
|delay=0
 +
|function_syntax= osMakeNotecard(string notecardName, list contents)
  
|- valign="top"
+
osMakeNotecard(string notecardName, string contents)
|'''Function Syntax''' || <source lang="lsl">
+
|ossl_example=<source lang="lsl">
osMakeNotecard(key id,string contents)
+
// osMakeNotecard example by Tom Earth
</source>
+
|- valign="top"
+
|'''Example(s)||<source lang="lsl">
+
//
+
//osMakeNotecard example
+
//By Tom Earth
+
  
 
default
 
default
Line 20: Line 15:
 
         key id = llDetectedKey(0);
 
         key id = llDetectedKey(0);
 
         string name = llKey2Name(id);
 
         string name = llKey2Name(id);
         string contents; //The variable we are going to use for the contents of the notecard.
+
         list contents; //The variable we are going to use for the contents of the notecard.
         contents += "Name: "+name+"\n";
+
         contents += ["Name: "+name+"\n"];
         contents += "Key: "+(string)id+"\n";
+
         contents += ["Key: "+(string)id+"\n"];
         contents += "Pos: "+(string)llDetectedPos(0)+"\n";
+
         contents += ["Pos: "+(string)llDetectedPos(0)+"\n"];
         contents += "Rotation: "+(string)llDetectedRot(0)+"\n";
+
         contents += ["Rotation: "+(string)llDetectedRot(0)+"\n"];
 
          
 
          
 
         osMakeNotecard(name,contents); //Makes the notecard.
 
         osMakeNotecard(name,contents); //Makes the notecard.
Line 33: Line 28:
 
}
 
}
 
</source>
 
</source>
 
+
|description=Creates a notecard with text in the prim that contains the script. Contents can be either a list or a string.
|}
+
|
 
+
}}
[[Category:OSSL Functions]]
+

Latest revision as of 06:36, 7 November 2019

osMakeNotecard(string notecardName, list contents)

osMakeNotecard(string notecardName, string contents)

Creates a notecard with text in the prim that contains the script. Contents can be either a list or a string.
Threat Level High
Permissions ${OSSL|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER
Delay 0 seconds
Example(s)
// osMakeNotecard example by Tom Earth
 
default
{
    touch_start(integer n)
    {
        key id = llDetectedKey(0);
        string name = llKey2Name(id);
        list contents; //The variable we are going to use for the contents of the notecard.
        contents += ["Name: "+name+"\n"];
        contents += ["Key: "+(string)id+"\n"];
        contents += ["Pos: "+(string)llDetectedPos(0)+"\n"];
        contents += ["Rotation: "+(string)llDetectedRot(0)+"\n"];
 
        osMakeNotecard(name,contents); //Makes the notecard.
 
        llGiveInventory(id,name); //Gives the notecard to the person.
        llRemoveInventory(name);
    }
}
Personal tools
General
About This Wiki