This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Script - Licht in 3 Stufen An und Aus schalten
#1
Script - Licht in 3 Stufen An und Aus schalten!

Dieses Script schaltet Licht in 3 unterschiedlichen Lichtstärken. Einfach das Script in ein Prim legen und drauf klicken.

Mit High, Medium oder Low funktioniert es mit der Version opensim-0.9.2.1 auf Ubuntu gut.

Informationen zum Ersteller sind nicht vorhanden.

Plattform: OpenSim

Autor: unbekannt

Lizenzbedingungen: k.A

Code:
// Lamp that turns off and on red
vector Color = <1,1,1>;
float  Falloff = 2.0;
float  Intensity = 1.0;
float  Radius = 20.0;
   

default
{
    state_entry()
    {
               
       
        llSetPrimitiveParams([PRIM_POINT_LIGHT, FALSE, Color, Intensity, Radius, Falloff]);
    }

    touch_start(integer total_number)
    {
        llSay(0,"Light On! High");
        state onHigh;
       
    }   

}    // End of default

state onHigh
{
    state_entry()
    {
       llSetPrimitiveParams([PRIM_POINT_LIGHT, TRUE, Color, Intensity, Radius, Falloff]);
    }
   
    touch_start(integer total_number)
    {
        llSay(0,"Light On! Medium");
        state onMedium;
       
    }   
}   // End of onHigh

state onMedium
{
   

   state_entry()
    {
        vector Colorm = <1,1,1>;
        float  Falloffm = 1.5;
        float  Intensitym = 0.600;
        float  Radiusm = 10.0;
               
       llSetPrimitiveParams([PRIM_POINT_LIGHT, TRUE, Colorm, Intensitym, Radiusm, Falloffm]);
    }

   
touch_start(integer total_number)
    {
        llSay(0,"Light On! Low");
        state onLow;
    }
} // End of on Medium


state onLow
{
   

   state_entry()
    {
        vector Colorl = <1,1,1>;
        float  Falloffl = 1.0;
        float  Intensityl = 0.300;
        float  Radiusl = 5.0;
               
       llSetPrimitiveParams([PRIM_POINT_LIGHT, TRUE, Colorl, Intensityl, Radiusl, Falloffl]);
    }

   
touch_start(integer total_number)
    {
        llSay(0,"Light Off!");
        state default;
    }
} // End of on Low


Der Autor dieses Beitrages haftet nicht für Schäden an Soft- oder Hardware, die durch das Benutzen vom Script entstehen.

Verwendung nur auf eigenes Risiko.
All done!
Zitieren
#2
(08.06.2022, 06:30)Lukas schrieb: Der Autor dieses Beitrages haftet nicht für Schäden an Soft- oder Hardware, die durch das Benutzen vom Script entstehen.

Verwendung nur auf eigenes Risiko.
Aber keine Angst vor dem Skript, es ist langzeiterprobt. Viele Linda-Kellie-Leuchten verwenden es seit mehr als zehn Jahren, und ich wüßte nicht, daß davon jemand zu Schaden gekommen ist.
Zitieren
#3
Danke Jupiter, möge dieses Script einigen Menschen Erleuchtung schenken.

Allerdings sei bemerkt, dass der Wirkungsradius vom Script äußerst eingeschränkt ist.
All done!
Zitieren


Gehe zu:


Benutzer, die gerade dieses Thema anschauen: 1 Gast/Gäste