Lighting in the virtual world

 Several months ago I decided to go to a disco and because there were so many people the lag was unbearable. So I kept my graphics to a minimum. When I returned to my virtual home, I forgot to put the graphic configuration as I had previously. I noticed something very strange, it was totally dark but the lights were not on. One of the most basic scripts that can be done is to detect when it is night or day. If it is night, turn on the lights automatically. But my script apparently didn't work, why? To investigate the matter, I built a tool that marked the position of the sun. The script comes below: string GetTimeOfDay ( float dayFraction ) { integer hours = ( integer ) ( dayFraction * 24 ) ; integer minutes = ( integer ) ( dayFraction * 24 * 60 ) % 60 ; integer percent = ( integer ) ( dayFraction * 100 ) ; return ( string ) hours + " : " + llGetSubString ( ( string ) ( 100 + minutes ) , 1 , 2 ) + " ( " + ( string ) pe

About the death and rebirth of my auto greeter

 One of the peculiarities of lsl scripts is that like any other programming language, they evolve over time. Inevitably some very old things can stop working properly. An example is an automated greeter that sends a welcome message to all visitors. Additionally it also maintains a list with the last 100 visitors. Since I built it in 2007 or 2008 I have never sold more than 5 or 6. One of the reasons is that there is one that is free and uses an external LAMP server (Linux + Apache + MySql + PHP) or similar. It is also true that I must have updated it a few times since then. Other scripters even having the competition of the free greeter have considerably improved their scripts by adding other features that the free greeter does not have. I have recently observed that my automated greeter is not working properly when click the option to list the last 100 visitors. It only shows the first 64 in the list, then it stops. At first I did not know how to diagnose what was happening. The scrip

Linksets in SecondLife (2)

Before approaching the script to make links securely while maintaining the original order, I will explain a trick to do it without scripts . Rez the object you want to add and link it to a newly created primitive. Link the target object (for example the car) to the newly created object. Unlink the root prim, that is, the primitive you just created. And that's all. If you have experimented with the LinkSpy.lsl script on all primitives you will see that the order is correct. Using the script that I created the instructions are a bit more complex, there are six steps instead of three. Put the JJReLink script in the inventory of object. Click the object. Object will ask for link permissions. click on Yes Link object you can add to linkset. (Ctrl + L) Click on object again. Remove JJReLink script and check that everything is working Warning: This script to work temporarily breaks all links. Make sure your object is not physical before use, or all parts

Linksets in SecondLife (1)

Suppose you have a nice car that you got for free at a freebie store. Your car has all the permissions, it is copyable, modifiable and you can transfer it to another avatar. You decide that you can improve it, adding other objects that you have found for free. Perhaps you like to put on the hood a skull with horns and a spare wheel at the rear and to give it a more "MadMax" look like metal window grilles. By doing so, you discover that your brand new car has stopped working. Maybe instead of turning the wheels, the seats turn, the lights are no longer on, and the particle emitters are wrong.   Many scripts assume that a primitive within the primitive set will always have the same binding number, and when primitives are added or removed the script crashes. I'm going to create a few scripts to see what exactly is going on. Script: LinkSpy.lsl PutTextInfo ( ) { string sMessage = " Link: " + ( string ) llGetLinkNumber ( ) + " \n "

My marketplace restored

I have added a few products to my marketplace. Little by little I will be adding more products. Basically those that do not require an update script until I have finished implementing my own update system. At the same time they are also in the new section of my store. On the right side of the photo are the lifting platforms. One to go up and another to go down. But the upper levels are empty.

snippet - Limit floats numbers and vectors to 2 digits.

Two little LSL functions to limit floats to only 2 digits. string float2Str ( float in ) { return ( string ) ( ( integer ) in ) + " . " + ( string ) ( ( integer ) ( ( in - ( integer ) in ) * 100 ) ) ; } string vector2Str ( vector v ) { return " < " + float2Str ( v . x ) + " , " + float2Str ( v . y ) + " , " + float2Str ( v . z ) + " > " ; } default { state_entry ( ) { } touch_start ( integer total_number ) { vector v = < 215.7509 , 235.845750 , 4001.50356 > ; llOwnerSay ( ( string ) v + " ======= " + vector2Str ( v ) ) ; } } If you wants less or more decimals you must modify the float2Str function and change the 100 by 10 if you want only 1 decimal or 1000, 10000, etc if you want more decimals.

All my things temporarily removed from Marketplace.

Almost everything I have, except for cheap things, has an update script inside. That script stopped working because the creator stopped marketing it and closed its website. I am currently creating my own update server. The development is slow. PHP is a hell for those of us who are used to languages compiled with strong typing. Sometimes an error writing the name of a variable makes me waste a lot of time until I realize it.Due the variables do not need to be previously declared, instead of notifying me of an error it is simply a new variable When everything is tested and working I will update all my things one by one, at the same time that I publish new developments. At the same time I will be adding all those things to Marketplace.