|LSL Portal||Functions | Events | Types | Operators | Constants | Flow Control | Script Library | Categorized Library | Tutorials|
Notecards & Parameters
In public domain scripts released with modify privileges, operational parameters (e.g. opening sounds for drawers, etc.) are usually set and changed right in the script by editing the script.
Scripted products that are sold, however, often use instead a notecard as the place where customers can change parameters to meet their individual needs. Doing this negates both the need to distribute proprietary scripts with modify privileges, and the need for customers to edit scripts (which most find frightening.)
To pull information from a notecard, you use the llGetNotecardLine function. As it comes into the script, it is captured in the dataserver event, during which event you parse the information and assign it to variables. There is an illustration of the procedure here: Notecard_reading.
Notecards are limited in several ways:
- When read by script:
- Only the first 255 bytes of each line are returned.
- Cannot contain embedded assets.
Sharing Notecard Access
In the course of shared projects, you may often need to let team members access notecards in objects owned by you, or need yourself to access notecards in objects owned by them.
To enable this, see: Editing someone else's scripts and notecards.
Embedded Assets in Notecards
Notecards can contain embedded assets, such as textures, landmarks, etc.
These cannot be accessed via script.
Tip! While it appears that the contents of one notecard, text and embedded objects, can manually be copied from one notecard to a second notecard, in fact you won't be able to save that second notecard. What you must do is drag the embedded objects to your inventory, and then from there drag into the second notecard.