Code:
//
// osSetProjectionParams Script Example
//
// Create a prim and fill it with sprite textures.
// Insert script and click Prim.
//
// Required Variables - Erforderliche Variablen
// the same as in the Features Menu. - Dies ist das gleiche wie im Features Menu
vector color = <1.0, 0.0, 0.0>; // color of light.- Farbe des Lichtes.
float intensity = 1.0; // intensity of light. - Intensitaet des Lichtes.
float radius = 20.0; // radius of light. - Radius des Lichtes.
float falloff = 0.000; // decrease the light.- Abnehmen des Lichtes.
// Texture UUID would be here, but it is fetched automatically. - Textur UUID waere hier, wird aber automatisch geholt
float fov = 1.5; // field of view - Sichtfeld
float focus = 20.0; // focus - Fokus
float ambiance = 0.0; // ambiances - Atmosphaere
projected_texture()
{
integer number = llGetInventoryNumber(INVENTORY_TEXTURE); // number of textures - anzahl der Texturen
float rand = llFrand(number); // random Prim inventory number - zufall Prim inventar nummer
integer choice = (integer)rand; // random Prim inventory number selection - zufall Prim inventar nummer auswahl
string name = llGetInventoryName(INVENTORY_TEXTURE, choice); // get texture name - textur name holen
key uuid = llGetInventoryKey(name); // get uuid key - uuid key holen
llSetTexture(name, 5); // set texture on prim face 5 - set texture on prim face 5
osSetPrimitiveParams(llGetKey(),[PRIM_POINT_LIGHT, TRUE, color, intensity, radius, falloff]); // Set the first 4 light parameters - Setze die ersten 4 Licht Parameter
osSetProjectionParams(TRUE, uuid, fov, focus, ambiance); // Set the second 5 light parameters - Setze die zweiten 5 Licht Parameter
}
default
{
touch_start(integer total_number)
{
projected_texture(); // start
}
}