Glow and light up when stepped on.

* Questions, answers and templates about scripting
* Fragen, Antworten und Beispiele zum Scripting

Glow and light up when stepped on.

Beitragvon oddball otoole » So 21. Apr 2013, 22:44

Translate to English translate to German Translate to French Translate to Italian Translate to Spanish Translate to Portuguese Translate to Czech Перевести на русский язык 翻译成中国

This script lets a prim glow and emits light when walked on.

Usage: put the script in a prim, walk on the prim. :D

The script:
Code: Alles auswählen
////////////////////////////////////////////////////////////////////
// Please leave any credits intact in any script you use or publish.
// Please contribute your changes to the Internet Script Library at
// http://www.free-lsl-scripts.com 
//
// Script Name: glow_when_stept_on.lsl
// Category: Glow
// Description: updated version for opensim
//- create new prim every time (don't copy)
//- put in script...
//
//see http://www.free-lsl-scripts.com/freescripts.plx?ID=1469  for original version
// Comment: ////////////////////////////////////////////////////////////////////
//// Please leave any credits intact in any script you use or publish.
//// Please contribute your changes to the Internet Script Library at
//// http://www.lslscripts.com  by Ferd Frederix
////
//// Script Name: Glow_when_walked_On.lsl
//// Category: Lighting
//// Description: I got tired of paying for ridiculously overpriced Avatar-like plants that glow when you walk on them.
//// Same thing goes for sidewalks that light up.  So here is a simple script that changes the glow of a prim when you walk on it.
//// Comment: Useful for ground plants that glow in the dark, lighted footsteps, and trails that point people the
//// direction you want them to go.  makes floor tiles, dance floors and other objects glow when bumped
////
//// Downloaded from : http://www.free-lsl-scripts.com/freescripts.plx?ID=1469
////
//// From the Internet LSL Script Database & Library of Second Lifeâ„¢ scripts.
//// http://www.free-lsl-scripts.com  by Ferd Frederix
////
//// This program is free software; you can redistribute it and/or modify
//// it under the terms of the GNU General Public License as published by
//// the Free Software Foundation; either version 2 of the License, or
//// (at your option) any later version.
////
//// This program is distributed in the hope that it will be useful,
//// but WITHOUT ANY WARRANTY; without even the implied warranty of
//// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//// GNU General Public License for more details.
////
//// Other licenses may be located within the source of this script,
//// in which case the more restrictive license is to take effect
////
//////////////////////////////////////////////////////////////////////
//
// Downloaded from : http://www.free-lsl-scripts.com/freescripts.plx?ID=1517
//
// From the Internet LSL Script Database & Library of Second Life™ scripts.
// http://www.free-lsl-scripts.com  by Ferd Frederix
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the license information included in each script
// by the original author.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
//
//
////////////////////////////////////////////////////////////////////
//
// Changelog:
// Version 1.01
// Date: 04-21-2013
// Name: Oddball Otoole
//
// Added light to the script so it not only glows when stepped on, but also emits light.
//
////////////////////////////////////////////////////////////////////
integer is_on = FALSE;
float glow = .2; // Amount of glow: 0.01 (very low glow) to 1.00 (Bright as the sun)
vector color = <1.00,1.00,1.00>; // red, green and blue values 0.00(dark) to 1.00(bright)
float light = 1.0;  // % brightness:  0.0 to 1.0
float radius = 10.00;  // range/distance of light:  0.0 to 20.0 meters
float falloff = 0.0;  // % brightness at max distance 0.00 to 1.00
default
{
    collision_start(integer num_detected)
    {
        if(!is_on)
        {
            float i;
            for(i = 0.0; i < glow; i += 0.020 )
            {
                llSetPrimitiveParams([PRIM_GLOW, ALL_SIDES, i , PRIM_POINT_LIGHT, TRUE, color , light, radius, falloff]);
                //llSleep(1.0);
            }
            is_on = TRUE;
        }
    }
    collision_end(integer num_detected)
    {
        if(is_on)
        {
            float i;
            for(i = glow; i > 0.0; i -= 0.020 )
            {
                llSetPrimitiveParams([PRIM_GLOW, ALL_SIDES, i , PRIM_POINT_LIGHT, FALSE, ZERO_VECTOR , 0.0, 0.0, 0.0]);
                //llSleep(1.0);
            }
            llSetPrimitiveParams([PRIM_GLOW, ALL_SIDES, 0]); // Turn off glow when step off prim....
            is_on = FALSE;
            llResetScript();
           
        }
    }
}
// Look for updates at : http://www.free-lsl-scripts.com/freescripts.plx?ID=1469
// __END__



// Look for updates at : http://www.free-lsl-scripts.com/freescripts.plx?ID=1517
// __END__


«Oddball ist anders als die Anderen.»
Benutzeravatar
oddball otoole
 
Beiträge: 199
Registriert: Do 17. Jan 2013, 22:27
Wohnort: Breda, The Netherlands

Re: Glow and light up when stepped on.

Beitragvon Dings Digital » Mo 22. Apr 2013, 08:05

Translate to English translate to German Translate to French Translate to Italian Translate to Spanish Translate to Portuguese Translate to Czech Перевести на русский язык 翻译成中国

Great and easy script :-)

Thanks oddy
Benutzeravatar
Dings Digital
 
Beiträge: 585
Registriert: So 4. Nov 2012, 19:07

Re: Glow and light up when stepped on.

Beitragvon Minethere Always » So 28. Apr 2013, 17:58

Translate to English translate to German Translate to French Translate to Italian Translate to Spanish Translate to Portuguese Translate to Czech Перевести на русский язык 翻译成中国

ah yes...i had that in my steampunk free oar but i will look at the additional scripting you did...sounds cool oddie-))
My Metro blogspace http://tinyurl.com/nlgvkk3
just another quasi-anonymous ephemeral wanderer...
Benutzeravatar
Minethere Always
 
Beiträge: 813
Registriert: Do 31. Jan 2013, 18:25

Re: Glow and light up when stepped on.

Beitragvon waleeed » Sa 20. Feb 2016, 13:49

Translate to English translate to German Translate to French Translate to Italian Translate to Spanish Translate to Portuguese Translate to Czech Перевести на русский язык 翻译成中国

i had that in my steampunk free oar but i will look at the additional scripting you did...sounds cool oddie-))
waleeed
Benutzeravatar
waleeed
 
Beiträge: 1
Registriert: Sa 20. Feb 2016, 13:46

Re: Glow and light up when stepped on.

Beitragvon Minethere Always » Sa 20. Feb 2016, 15:17

Translate to English translate to German Translate to French Translate to Italian Translate to Spanish Translate to Portuguese Translate to Czech Перевести на русский язык 翻译成中国

waleeed hat geschrieben:i had that in my steampunk free oar but i will look at the additional scripting you did...sounds cool oddie-))


uh? lol

gave me a laugh while waking up, thank you!!
My Metro blogspace http://tinyurl.com/nlgvkk3
just another quasi-anonymous ephemeral wanderer...
Benutzeravatar
Minethere Always
 
Beiträge: 813
Registriert: Do 31. Jan 2013, 18:25

Re: Glow and light up when stepped on.

Beitragvon Ska Skaduwee » Sa 20. Feb 2016, 16:30

Translate to English translate to German Translate to French Translate to Italian Translate to Spanish Translate to Portuguese Translate to Czech Перевести на русский язык 翻译成中国

hi Minethere

NO "waking up" it seems to be an fake account
Ska Skaduwee
 
Beiträge: 170
Registriert: Sa 21. Jul 2012, 16:03
Wohnort: absurdistan

Re: Glow and light up when stepped on.

Beitragvon Minethere Always » Sa 20. Feb 2016, 16:44

Translate to English translate to German Translate to French Translate to Italian Translate to Spanish Translate to Portuguese Translate to Czech Перевести на русский язык 翻译成中国

yes, I know Ska-)) it was just funny and I need all the funny I can get lol
My Metro blogspace http://tinyurl.com/nlgvkk3
just another quasi-anonymous ephemeral wanderer...
Benutzeravatar
Minethere Always
 
Beiträge: 813
Registriert: Do 31. Jan 2013, 18:25


Zurück zu Scripting

Wer ist online?

Mitglieder in diesem Forum: 0 Mitglieder und 1 Gast



Powered by phpBB

Deutsche Übersetzung durch phpBB.de
.

Style designed by Artodia.