Showing posts with label LSL. Show all posts
Showing posts with label LSL. Show all posts

Thursday, 28 January 2016


Rubik cubes

I've made some working Rubik cubes for Second Life, in all of the sizes above. The largest is 5x5x5. There will not be any 6x6x6 or 7x7x7, because 5x5x5 is already pushing the limit of what Second Life can handle.

There are also miniature working 3x3x3 cubes as earrings and two pairs of unscripted earrings, one pair solved and one pair scrambled.

All in my Marketplace store. The unscripted earrings are free.

Friday, 24 August 2012

LSL tutorial: Communication between parent and child


Back when I started to write complex scripts, one of the first puzzles I needed to solve was this: Object A rezzes object B out of its inventory, and needs to send some startup information to B. How can it do this?

When A rezzes B, the only information it can pass to it in the call to llRezObject is a single integer. When object B wakes up, its on_rez event receives that integer as the start_param. But suppose you need to send more information than that? Then A has to send it by encoding it into a string and speaking it. The channel it is going to speak on can be sent as the start parameter.

This won’t work:

In A:
llRezObject( channelNumber, ... );
llSay( channelNumber, ... );

In B:
on_rez( integer channelNumber ) {
   llListen( channelNumber, ... );
}

The reason is that A cannot assume that B is listening, or even exists, by the time that A speaks. Spoken messages are never queued: if no-one is listening, they are not heard. How can A make sure that when it speaks to B, B is already rezzed and listening?