Thanks for the replies.<br>Sure would be nice to be able to &#39;port&#39; the existing haskell code to C or  C++ or Java.<br>From what I&#39;ve seen of haskell I  can&#39;t make heads or tails of it.<br><br>Shameless plug for Second Life(SL).  It has really affected my first life.<br>
Prompting me to continue to program, to struggle with gimp, and to learn to use <br>blender(used to make complex objects for import into SL), an open source 3d modelling package.<br>Some time back a blender demo was planned for colug and I wanted to see it as I was struggling.<br>
Unfortunately the blender demo was cancelled.  Since them I&#39;ve watched many youtube videos and<br>can make simple objects.<br><br>I have been thinking it would be fun to give a demo of using blender to create an object and import into<br>
SL for colug.<br><br>Here is a simple example of a working lsl script I wrote recently.<br><br>---------start---------------<br>string  Version = &quot;1.0&quot;;<br>string  Help    = &quot;HairLock ReadMe&quot;;<br>string ArrivalSound = &quot;5dfc8d49-344a-1810-5193-1ec067c14d3f&quot;;<br>
key Owner;<br>integer State;<br>integer Main = 0;<br>integer Sounds = 1;<br>integer Particles = 2;<br><br>integer SoundOn = TRUE;<br>integer ParticlesOn = TRUE;<br>integer locked;<br>integer Channel;<br>integer ListenToken;<br>
list    ParticleList;<br>list    SoundsList;<br><br>Menu(key Agent) {<br>    list Buttons;<br>    string Message;<br>    Message = llKey2Name(Owner) + &quot;&#39;s Hair.  &quot; + Version;<br>    if ( State == Main ) {<br>
        if (locked ) Buttons += &quot;Unlock&quot;;<br>        else Buttons += &quot;Lock&quot;;<br>        Buttons += &quot;Particles&quot;;<br>        Buttons += &quot;Help&quot;;<br><br>        Buttons += &quot;Sound&quot;;<br>
        Buttons += &quot;Test&quot;;<br><br>    } else if ( State == Sounds ) {<br>        if ( SoundOn ) Buttons += &quot;Off&quot;;<br>        else Buttons += &quot;On&quot;;<br>        Buttons += &quot;^&quot;;<br>    } else if ( State = Particles ) {<br>
        if ( ParticlesOn ) Buttons += &quot;Off&quot;;<br>        else Buttons += &quot;On&quot;;<br><br>        Buttons += &quot;^&quot;;<br>    }<br>    llDialog(Agent,Message,Buttons,Channel);<br>    ListenToken = llListen(Channel,&quot;&quot;,Agent,&quot;&quot;);<br>
}<br><br>TelePort() {<br>    if ( SoundOn ) {<br>        llPreloadSound(ArrivalSound);<br>    }<br>    if ( ParticlesOn ) {<br>        //BlueShine();<br>        LightOfGod();<br>    }<br>    llSetTimerEvent(2.0);   <br>}<br>
<br>BlueShine()<br>{<br>    llParticleSystem([<br>            PSYS_PART_FLAGS, PSYS_PART_EMISSIVE_MASK | PSYS_PART_TARGET_POS_MASK | PSYS_PART_INTERP_COLOR_MASK | PSYS_PART_INTERP_SCALE_MASK | PSYS_PART_FOLLOW_VELOCITY_MASK | PSYS_PART_FOLLOW_SRC_MASK,<br>
            PSYS_PART_MAX_AGE, 3.818628,<br>            PSYS_PART_FLAGS, 337,<br>            PSYS_PART_START_COLOR, &lt;1.00000, 0.00000, 1.00000&gt;,<br>            PSYS_PART_END_COLOR, &lt;0.00000, 1.00000, 1.00000&gt;,<br>
            PSYS_PART_START_SCALE, &lt;0.10000, 0.10000, 0.00000&gt;,<br>            PSYS_PART_END_SCALE, &lt;0.50000, 0.60000, 0.00000&gt;,<br>            PSYS_SRC_PATTERN, 2,<br>            PSYS_SRC_BURST_RATE, 1.000000,<br>
            PSYS_SRC_ACCEL, &lt;0.00000, 0.00000, 0.00000&gt;,<br>            PSYS_SRC_BURST_PART_COUNT, 27,<br>            PSYS_SRC_BURST_RADIUS, 8.000000,<br>            PSYS_SRC_BURST_SPEED_MIN, 1.000000,<br>            PSYS_SRC_BURST_SPEED_MAX, 1.000000,<br>
            PSYS_SRC_TARGET_KEY, llGetKey(),<br>            PSYS_SRC_INNERANGLE, 3.000000,<br>            PSYS_SRC_OUTERANGLE, 3.000000,<br>            PSYS_SRC_OMEGA, &lt;0.00000, 0.00000, 0.00000&gt;,<br>            PSYS_SRC_MAX_AGE, 0.0,<br>
            PSYS_SRC_TEXTURE, &quot;&quot;,<br>            PSYS_PART_START_ALPHA, 1.000000,<br>            PSYS_PART_END_ALPHA, 1.000000<br><br>                ]);<br>}<br><br>LightOfGod()<br>{<br>    llParticleSystem([        <br>
            PSYS_PART_FLAGS, PSYS_PART_EMISSIVE_MASK|PSYS_PART_INTERP_COLOR_MASK | PSYS_PART_INTERP_SCALE_MASK | PSYS_PART_FOLLOW_VELOCITY_MASK,<br>            PSYS_PART_START_COLOR, &lt;1.0, 1.0, 1.0&gt;,  <br>            PSYS_PART_END_COLOR, &lt;1.0, 1.0, 1.0&gt;,<br>
            PSYS_SRC_ACCEL, &lt;0.0, 0.0, 0.0&gt;,  <br>            PSYS_PART_START_SCALE, &lt;.4, 30.1, 0.0&gt;,<br>            PSYS_PART_END_SCALE, &lt;0.1, 30.0, 0.0&gt;,<br>            PSYS_PART_START_ALPHA,      1.0,<br>
            PSYS_PART_END_ALPHA,        0.0,       //This sets the size (scale) of the particles to 0.5m<br>            PSYS_PART_MAX_AGE, 5.0,                     //This gives us the lifetime of the particles<br>            PSYS_SRC_BURST_RATE, 0.1,<br>
            PSYS_SRC_BURST_RADIUS,      1.0,                    //There&#39;s a new burst every 1.0 seconds<br>            PSYS_SRC_BURST_SPEED_MIN, 0.30,                //The minimum speed of the particles (in m/s)<br>            PSYS_SRC_BURST_SPEED_MAX, 2.0,                //The maximum speed - so they move slowly<br>
            PSYS_SRC_BURST_PART_COUNT, 1000,                //How many particles to make<br>            PSYS_SRC_PATTERN, PSYS_SRC_PATTERN_EXPLODE    //The pattern we use, this is all round the prim.<br>            ]);<br>
}<br><br><br>default {<br>    state_entry() {<br>        locked=FALSE;<br>        Channel = (integer)(llFrand(-64760) - 1000.0);<br>        Owner = llGetOwner();<br>    }<br><br>    touch_start(integer num) {<br>        if ( Owner != llDetectedKey(0) ) return;<br>
        Menu( llDetectedKey(0) );<br>    }<br><br>    on_rez(integer num)<br>    {<br>        Owner = llGetOwner();<br>        if (locked) llOwnerSay(&quot;@detach=n&quot;);<br>    }<br>    changed(integer change)<br>    {<br>
        if ( CHANGED_TELEPORT &amp; change )<br>        {<br>            TelePort();<br>        }<br>    }<br>    timer() {<br>        llSetTimerEvent(0.0);<br>        if ( SoundOn )  llPlaySound(ArrivalSound,10.0);<br>        // shut off Particles if any<br>
        llParticleSystem([]);  <br>    }<br>    listen(integer chan,string name,key id,string msg) {<br>        llListenRemove(ListenToken);<br>        if ( &quot;^&quot; == msg ) {<br>            State = Main;<br>            Menu(id);<br>
            return;<br>        }<br>        if ( State == Main ) {<br>            if ( &quot;Lock&quot; == msg ) {<br>                llOwnerSay(&quot;@detach=n&quot;);<br>                locked = TRUE;<br>                llOwnerSay(&quot;Locked&quot;);<br>
            } else if (&quot;Unlock&quot; == msg ) {<br>                llOwnerSay(&quot;@detach=y&quot;);<br>                locked = FALSE;<br>                llOwnerSay(&quot;Unlocked&quot;);<br>            } else if (&quot;Sound&quot; == msg ) {<br>
                State = Sounds;<br>                Menu(id);<br>            } else  if (&quot;Particles&quot; == msg ) {<br>                State = Particles;<br>                Menu(id);<br>            } else if ( &quot;Help&quot; == msg ) {<br>
                llGiveInventory(id,Help);<br>            } else if ( &quot;Test&quot; == msg ) {<br>                TelePort();<br>            }<br>            return;<br>        } else if ( State == Sounds ) {<br>            if ( &quot;On&quot; == msg ) {<br>
                SoundOn=TRUE;<br>            } else if (&quot;Off&quot; == msg ) {<br>                SoundOn=FALSE;<br>            }<br>            State = Main;<br>            Menu(id);<br>            return;<br>        }else if ( State == Particles ){<br>
            if ( &quot;On&quot; == msg ) {<br>                ParticlesOn=TRUE;<br>            } else if ( &quot;Off&quot; == msg ) {<br>                ParticlesOn=FALSE;<br>            }<br>            State = Main;<br>
            Menu(id);<br>            return;<br>        } else {<br>            llOwnerSay(&quot;Unknown State&quot;);<br>        }<br>        llOwnerSay(&quot;Unknown Button \&quot;&quot; + msg + &quot;\&quot;.&quot;);<br>
<br>    }<br>}<br>--------------------------------------end--------------------<br><br>