Don't click here unless you want to be banned.

LSL Wiki : LSL101solutions

HomePage :: PageIndex :: RecentChanges :: RecentlyCommented :: UserSettings :: You are ia360925.us.archive.org
<Table of Contents>

Solutions To Challenges


Such accidents I have always taken philosophically, looking on them as a kind of insurance against more terrible ones.

- Alberto Santos-Dumont, 1904



We hope that you are looking at this solutions page out of idle curiosity, after solving a challenge yourself -- not too quickly nor too easily, but with just enough effort to yield a pleasant glow of achievement and an enhanced understanding of LSL.

If that is not the case, and on the contrary you are stuck, frustrated, and about to call it a night, then we hope that these solutions will help you master the situation! And we hope that you will now contribute to this wiki to better explain the point that was bothering you, and smooth the path for those who follow!

States And Events Challenge: Tickle Box


The point of this challenge is to use states and events, the backbone of every LSL script, to model successive stages of in-world behavior. A sub-point is to give practice in using the Wiki Search to look up functions.


default
{
    touch_start(integer total_number)
    {
        llOwnerSay("Now, touch me again.");
        state tickled;
    }
}
    
state tickled
{
    touch_start(integer total_number)
    {
        llOwnerSay("Thank you!  That felt good.");   
        llResetScript();
    }
}

<Table of Contents>

Homepage | LSL101 | Tutorial | CrashCourse | Glossary
There is no comment on this page. [Display comments/form]