SlideShare una empresa de Scribd logo
1 de 4
Descargar para leer sin conexión
“Getting the Code You Need”
Presented by Lea Tesoro / Opal Lei at the Non-Profit Commons in Second Life on November 9, 2012

This document contains the questions asked in the pre-talk survey and Opal’s answers.

To receive a copy of the expanded version of the LSL spec-writing guideline as a pdf file, please fill out the
post-talk survey at http://www.surveymonkey.com/s/R3VDKJV or send email to opallei@gmail.com. If
Opal updates the document, you will automatically receive a copy by email.


Q&A

Q: What are the best current resources for learning more about scripting?
The LSL portal in the Second Life wiki should be your bible: http://wiki.secondlife.com/wiki/LSL_Portal .
I still refer to it every time to look up the correct spelling of a function name and/or to check the
parameters it requires. Copying and pasting the syntax avoids wasted time looking for a bug caused by
misspelling or by the wrong parameter type.

An older resource is lslwiki.net, but I’m not sure how up-to-date that is. However, some of the functions
are better described there than in the SL wiki.

Don’t read it all at once. Just take the time to look up the one or two functions that you need.



DISCLAIMER: I cannot vouch for nor recommend any of the following individuals, groups, sites or
organizations, because I have no connections nor interactions with them.

       College of Scripting: http://maps.secondlife.com/secondlife/Horsa/57/243/84
       Builder’s Brewery (buildersbrewery.com)
       Groups:
            o “Scripting Mentors” looks like a good one to join.
            o Search for “scripting” in Groups.
       YouTube:
            o Search for “lsl scripting tutorial”.
       A website that generates LSL based on your answers to multiple choice questions:
            o http://www.3greeneggs.com/autoscript/
       A website that generates LSL particle scripts (Thank you, Patio Plasma, for the tip!):
            o http://particles-lsl-generator.bashora.com
Getting the Code You Need – Q&A                                                                               2


Q: How come a script such as a moving texture stays in the prim even after you delete the
script? I made some moving water and wanted to stop it but couldn't even after I deleted the
script.
Texture animation is a property of the prim. Same as the hovertext. To stop the animation, you need to
run a script that explicitly “stops” the animation by changing the value of that prim property.

default
{
     state_entry()
     {
          llSetTextureAnim( 0, ALL_SIDES, 1, 1, 1.0, 1, 1 );
     }
}




Q: Why do scripts suddenly stop working?
It could be one of many reasons.

Assuming that you’re in a parcel that allows scripts to run, …

Assuming that the script is actually running, …

Assuming that the script doesn’t have other conditions that prevent it from running; i.e.: it only works if
you’re the owner of the object, or it only works underwater, or there’s an expiration built into the code
(These conditions are, of course, usually rare, except the owner one), …

… If the script is very old, it might be hitting some limitations that LL had imposed sometime after the
script was written, like the length of the object name, the length of the description, the length of the
hovertext allowed. These are typically where scripts store data. It could also be other changes in the
LSL API that affect the script.

… If the scripts depends on data outside SL, like a website or a database, and the creator had left SL and
deleted the website and the database, … depending how user-friendly the script is, it might just stop
running and not give you any idea why.

… If the script exceeds the memory allocated to it, ... for example, if you’re saving the names of all your
visitors and you usually clear the log once a day, but you had an unusually high number of visitors that
day, then your script could crash for lack of memory space, again depending on how it’s scripted to
handle errors. Most scripters usually don’t handle errors gracefully or validate data. That’s because
they’re focused on the performance of the script or on getting it done as quickly as possible, and those
things add complexity and bulk to the script. Or they really don’t know good coding practices.




v20121109                                             ©2012 Eleanor (Lea) Tesoro / Opal Lei (VirtuaSapient.com)
Getting the Code You Need – Q&A                                                                                3


Q: How do you get scripts to talk to each other?
Depends how far away they are from each other.

       If they’re in the same prim or object, use llMessageLinked.
       If they’re in different objects but are within 20m of each other, use llSay in a private channel and
        llListen in the recipient.
       If within 96m of each other, use llShout in a private channel.
       If within the same sim, use llRegionSay or llRegionSayTo in a private channel.
       If they are in different sims, use llEmail. Watch out for restrictions to that function though.


In any of these, I would suggest using measures to secure your communication channel and avoid lag by
cutting down the noise you listen to. For example, if you have to listen to channel 0, which is the public
chat channel, limit it to listen to only one person. Ideally, use another channel. Ideally, as far away from
zero as allowed. Ideally, a negative number.

Of course, there are hacky ways to exchange information too.




Q: How many scripts can you put into an object?
Theoretically, as many items as you can put into the object, regardless of type.

Practically, depending on the scripts. If they are all running, you’ll probably crash the sim before you get
to that theoretical limit. Please let me know if you try it. ;)




Q: How do you know it is okay to modify a script?
If the script is intentionally open-source, the creator will probably include a license statement in it that
tells you what you’re allowed to do with the script.

If the creator gave you a modifiable script and does not explicitly give you permission to do what you
will with it, it’s best to explicitly ask the creator what you’re allowed to do with it. They might allow you
to modify it for personal use only or for your products only, but not to distribute it otherwise, whether
you modified it or not. That applies to the script as a whole and to significant parts of the script.

When in doubt, ask the creator.




v20121109                                              ©2012 Eleanor (Lea) Tesoro / Opal Lei (VirtuaSapient.com)
Getting the Code You Need – Q&A                                                                         4


Q: What kind of credit do you need to keep posted inside a script that you modified?
If it’s open-source, leave in what other contributors before you had written. When you modify a part of
it, you can create a comment with your unique name, email address or however you want to be known,
the date of modification, a description of the modification, and why.




Q: what is the difference between creating machinima and animating an avatar more
responsively for a mixed reality event?
It sounds like there are some misconceptions mixed in there, so I’ll try to explain as best as I can.

A machinima is a movie filmed inside a game environment, like SL. When you said “animating an
avatar”, I’m guessing that you don’t mean animations, but artificial intelligence. There are systems using
external code and special viewers that animate bots inside SL. But I think they’re still expensive and the
technology is still really barely developed so it cannot do much beyond inviting you to join a group or
giving you a predefined greeting or a notecard. I could be wrong.




v20121109                                             ©2012 Eleanor (Lea) Tesoro / Opal Lei (VirtuaSapient.com)

Más contenido relacionado

Último

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 

Último (20)

Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 

Destacado

How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
ThinkNow
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
 

Destacado (20)

Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 

Getting the Code You Need - Q&A

  • 1. “Getting the Code You Need” Presented by Lea Tesoro / Opal Lei at the Non-Profit Commons in Second Life on November 9, 2012 This document contains the questions asked in the pre-talk survey and Opal’s answers. To receive a copy of the expanded version of the LSL spec-writing guideline as a pdf file, please fill out the post-talk survey at http://www.surveymonkey.com/s/R3VDKJV or send email to opallei@gmail.com. If Opal updates the document, you will automatically receive a copy by email. Q&A Q: What are the best current resources for learning more about scripting? The LSL portal in the Second Life wiki should be your bible: http://wiki.secondlife.com/wiki/LSL_Portal . I still refer to it every time to look up the correct spelling of a function name and/or to check the parameters it requires. Copying and pasting the syntax avoids wasted time looking for a bug caused by misspelling or by the wrong parameter type. An older resource is lslwiki.net, but I’m not sure how up-to-date that is. However, some of the functions are better described there than in the SL wiki. Don’t read it all at once. Just take the time to look up the one or two functions that you need. DISCLAIMER: I cannot vouch for nor recommend any of the following individuals, groups, sites or organizations, because I have no connections nor interactions with them.  College of Scripting: http://maps.secondlife.com/secondlife/Horsa/57/243/84  Builder’s Brewery (buildersbrewery.com)  Groups: o “Scripting Mentors” looks like a good one to join. o Search for “scripting” in Groups.  YouTube: o Search for “lsl scripting tutorial”.  A website that generates LSL based on your answers to multiple choice questions: o http://www.3greeneggs.com/autoscript/  A website that generates LSL particle scripts (Thank you, Patio Plasma, for the tip!): o http://particles-lsl-generator.bashora.com
  • 2. Getting the Code You Need – Q&A 2 Q: How come a script such as a moving texture stays in the prim even after you delete the script? I made some moving water and wanted to stop it but couldn't even after I deleted the script. Texture animation is a property of the prim. Same as the hovertext. To stop the animation, you need to run a script that explicitly “stops” the animation by changing the value of that prim property. default { state_entry() { llSetTextureAnim( 0, ALL_SIDES, 1, 1, 1.0, 1, 1 ); } } Q: Why do scripts suddenly stop working? It could be one of many reasons. Assuming that you’re in a parcel that allows scripts to run, … Assuming that the script is actually running, … Assuming that the script doesn’t have other conditions that prevent it from running; i.e.: it only works if you’re the owner of the object, or it only works underwater, or there’s an expiration built into the code (These conditions are, of course, usually rare, except the owner one), … … If the script is very old, it might be hitting some limitations that LL had imposed sometime after the script was written, like the length of the object name, the length of the description, the length of the hovertext allowed. These are typically where scripts store data. It could also be other changes in the LSL API that affect the script. … If the scripts depends on data outside SL, like a website or a database, and the creator had left SL and deleted the website and the database, … depending how user-friendly the script is, it might just stop running and not give you any idea why. … If the script exceeds the memory allocated to it, ... for example, if you’re saving the names of all your visitors and you usually clear the log once a day, but you had an unusually high number of visitors that day, then your script could crash for lack of memory space, again depending on how it’s scripted to handle errors. Most scripters usually don’t handle errors gracefully or validate data. That’s because they’re focused on the performance of the script or on getting it done as quickly as possible, and those things add complexity and bulk to the script. Or they really don’t know good coding practices. v20121109 ©2012 Eleanor (Lea) Tesoro / Opal Lei (VirtuaSapient.com)
  • 3. Getting the Code You Need – Q&A 3 Q: How do you get scripts to talk to each other? Depends how far away they are from each other.  If they’re in the same prim or object, use llMessageLinked.  If they’re in different objects but are within 20m of each other, use llSay in a private channel and llListen in the recipient.  If within 96m of each other, use llShout in a private channel.  If within the same sim, use llRegionSay or llRegionSayTo in a private channel.  If they are in different sims, use llEmail. Watch out for restrictions to that function though. In any of these, I would suggest using measures to secure your communication channel and avoid lag by cutting down the noise you listen to. For example, if you have to listen to channel 0, which is the public chat channel, limit it to listen to only one person. Ideally, use another channel. Ideally, as far away from zero as allowed. Ideally, a negative number. Of course, there are hacky ways to exchange information too. Q: How many scripts can you put into an object? Theoretically, as many items as you can put into the object, regardless of type. Practically, depending on the scripts. If they are all running, you’ll probably crash the sim before you get to that theoretical limit. Please let me know if you try it. ;) Q: How do you know it is okay to modify a script? If the script is intentionally open-source, the creator will probably include a license statement in it that tells you what you’re allowed to do with the script. If the creator gave you a modifiable script and does not explicitly give you permission to do what you will with it, it’s best to explicitly ask the creator what you’re allowed to do with it. They might allow you to modify it for personal use only or for your products only, but not to distribute it otherwise, whether you modified it or not. That applies to the script as a whole and to significant parts of the script. When in doubt, ask the creator. v20121109 ©2012 Eleanor (Lea) Tesoro / Opal Lei (VirtuaSapient.com)
  • 4. Getting the Code You Need – Q&A 4 Q: What kind of credit do you need to keep posted inside a script that you modified? If it’s open-source, leave in what other contributors before you had written. When you modify a part of it, you can create a comment with your unique name, email address or however you want to be known, the date of modification, a description of the modification, and why. Q: what is the difference between creating machinima and animating an avatar more responsively for a mixed reality event? It sounds like there are some misconceptions mixed in there, so I’ll try to explain as best as I can. A machinima is a movie filmed inside a game environment, like SL. When you said “animating an avatar”, I’m guessing that you don’t mean animations, but artificial intelligence. There are systems using external code and special viewers that animate bots inside SL. But I think they’re still expensive and the technology is still really barely developed so it cannot do much beyond inviting you to join a group or giving you a predefined greeting or a notecard. I could be wrong. v20121109 ©2012 Eleanor (Lea) Tesoro / Opal Lei (VirtuaSapient.com)