SlideShare ist ein Scribd-Unternehmen logo
1 von 4
Downloaden Sie, um offline zu lesen
“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)

Weitere ähnliche Inhalte

Kürzlich hochgeladen

08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
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...Igalia
 
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 Nanonetsnaman860154
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
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.pptxMalak Abu Hammad
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
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 MenDelhi Call girls
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 

Kürzlich hochgeladen (20)

08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
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...
 
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
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
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
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
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
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 

Empfohlen

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 ChatGPTExpeed Software
 
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 EngineeringsPixeldarts
 
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 HealthThinkNow
 
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.pdfmarketingartwork
 
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 2024Neil Kimberley
 
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)contently
 
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 2024Albert Qian
 
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 InsightsKurio // The Social Media Age(ncy)
 
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 2024Search Engine Journal
 
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 summarySpeakerHub
 
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 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 Tessa Mero
 
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 IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
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 managementMindGenius
 
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...RachelPearson36
 
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...Applitools
 

Empfohlen (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)