Wednesday 19 March 2008

Monday 25-02-2008

Using Dialogue type of interaction
Dialogue type of interaction are very useful when you want the avatar to know exactly what is happening instead of just interacting using touch or sit. Users may be shown a list of options when interacting with an object which is implemented with llDialog. A great example will be the bartender in my rotating restaurant.

The lldialog function display a menu like dialogue box to interact with avatar, the menu can be hierarchical, that means there than be sub-menus under the main menu, this will widen the range of options can be offered to the interacting avatar.

Gathering ideas
When I first started to learn about second life I really do not have any idea on how to create anything with scripts, I do have a very limited knowledge how to code anything even I am an IT student. Since I have try to build up our bit of the island, I have started to realise ideas is the main thing that motivate me to learn scripting properly. Once I've got an idea, I start building it, and search for the appropriate built-in function to achieve my goals.

Here are the WIKIs I use most of the time to find built-in functions:
LSL Wiki
Second Life LSL Portal


Using the function 'Listen' in Linden Script to work with other prims
It is true that an object cannot send a message using llSay, llShout or llWhisper to itself, it will not work, it's been suggested that using link_message and llMessageLinked for this matters, it will work a lot better without panalty, such as lag and perhaps receive message error, etc.
There are cases that you may want and need to use listen , llListen in conjunction of llSay, llShout or llWhisper in order to make prims / objects to communicate with each others.

An example of this type of objects communication can be found inside my restaurant. The elevator control panes on every floors and the elevator itself communicate with each others by llSay and llListen, so when an avatar touches a button on one of the elevator control pane, it sends a message to the elevator, and it will then act accordingly.

Me on the elevator with the control pane

Using 'llShout' to form communication between prims or objects that further away
As mentioned above, communicating between prims or objects, we can use llSay and llListen, but there are some situations you may want to use llShout instead, such as the objects communicating with each other are far away(>100m) from each others (But not too far that llShout won't reach the object with the llListen function in its script).
There is also other benefits for choosing this kind of object communication, for example you can make your objects to work with other people's object if you have compromise a communal channel where their objects can communicate in order to perform tasks.

A great example of this will be the advertisement board I've created, it teleport avatar who clicked on the advert to another group's land where there is a interactive voting system and instruct the avatar to vote for our group. The advertisement board sends two messages to the voting system after teleporting the avatar there, to show the board, so if the boards are hidden, they will be shown automatically.

Our island advertisement board
Marcus's Voting and Statistics board

No comments: