Difference between revisions of "CampFire Script"

From Second Life Wiki
Jump to navigation Jump to search
(CampFire Script)
 
m
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
Here's a nifty little script I created to give a campfire the appearance of flickering flames. To use, simply drop the script, along with a sound of choice, into a prim in the campfire and watch it glow!
Here's a nifty little script I created to give a campfire the appearance of flickering flames. To use, simply drop the script, along with a sound of choice, into a prim in the campfire and watch it glow!


<lsl>
// Created 09-26-2010 by JC Jones, SL name JC Zepp. Feel free to distribute or modify, but leave the header intact and leave the script full permissions. DO NOT RESELL THIS SCRIPT AS IS.Feel free to donate to JC Zepp inworld if you find this script useful. To use simply drop this script into a prim in your campfire along with a nice fire crackle sound. put the name of your sound in the script where indicated  
// Created 09-26-2010 by JC Jones, SL name JC Zepp. Feel free to distribute or modify, but leave the header intact and leave the script full permissions. DO NOT RESELL THIS SCRIPT AS IS.Feel free to donate to JC Zepp inworld if you find this script useful. To use simply drop this script into a prim in your campfire along with a nice fire crackle sound. put the name of your sound in the script where indicated  
default
default
{
{
Line 100: Line 102:
    
    
}
}
</lsl>

Latest revision as of 11:21, 26 September 2010

Here's a nifty little script I created to give a campfire the appearance of flickering flames. To use, simply drop the script, along with a sound of choice, into a prim in the campfire and watch it glow!

<lsl> // Created 09-26-2010 by JC Jones, SL name JC Zepp. Feel free to distribute or modify, but leave the header intact and leave the script full permissions. DO NOT RESELL THIS SCRIPT AS IS.Feel free to donate to JC Zepp inworld if you find this script useful. To use simply drop this script into a prim in your campfire along with a nice fire crackle sound. put the name of your sound in the script where indicated

default {

   state_entry()
   
   {
       
       llPlaySound("put your sound name here", 0.25);
       llSetPrimitiveParams([PRIM_POINT_LIGHT, TRUE, <1, 0.5, 0>, 0.55, 7.20, 0.65]);
       
       {
           
       llSetTimerEvent(0.05);
       }
       llSetPrimitiveParams([PRIM_POINT_LIGHT, TRUE, <1, 0.5, 0>, 0.5, 7.8, 0.25]);
   
       {
           
       llSetTimerEvent(0.12);
       }
       
       llSetPrimitiveParams([PRIM_POINT_LIGHT, TRUE, <1, 0.5, 0>, 0.55, 6.8, 0.35]);
       
       {
           
       llSetTimerEvent(0.08);
       }
       llSetPrimitiveParams([PRIM_POINT_LIGHT, TRUE, <1, 0.5, 0>, 0.45, 8.0, 0.15]);
       {
           
       llSetTimerEvent(0.12);
       }
       llSetPrimitiveParams([PRIM_POINT_LIGHT, TRUE, <1, 0.5, 0>, 0.50, 7.0, 0.45]);
   
       {
           
       llSetTimerEvent(0.10);
       }
       
       llSetPrimitiveParams([PRIM_POINT_LIGHT, TRUE, <1, 0.5, 0>, 0.65, 8.0, 0.25]);
       
       {
           
       llSetTimerEvent(0.08);
       }
       llSetPrimitiveParams([PRIM_POINT_LIGHT, TRUE, <1, 0.5, 0>, 0.50, 7.5, 0.55]);
       
       {
           
       llSetTimerEvent(0.08);
       
       }
       llSetPrimitiveParams([PRIM_POINT_LIGHT, TRUE, <1, 0.5, 0>, 0.45, 7.0, 0.25]);
   
       {
           
       llSetTimerEvent(0.12);
       }
       
       llSetPrimitiveParams([PRIM_POINT_LIGHT, TRUE, <1, 0.5, 0>, 0.6, 8.0, 0.35]);
       
       {
           
       llSetTimerEvent(0.08);
       }
       llSetPrimitiveParams([PRIM_POINT_LIGHT, TRUE, <1, 0.5, 0>, 0.40, 7.0, 0.15]);
       {
           
       llSetTimerEvent(0.12);
       }
       llSetPrimitiveParams([PRIM_POINT_LIGHT, TRUE, <1, 0.5, 0>, 0.65, 8.50, 0.45]);
   
       {
           
       llSetTimerEvent(0.10);
       }
       
       llSetPrimitiveParams([PRIM_POINT_LIGHT, TRUE, <1, 0.5, 0>, 0.55, 7.50, 0.25]);
       
       {
           
       llSetTimerEvent(0.08);
       }
       llSetPrimitiveParams([PRIM_POINT_LIGHT, TRUE, <1, 0.5, 0>, 0.45, 8.90, 0.55]);
   
        llResetScript();
   } 
  

} </lsl>