Category:Scripts

From OpenSimulator

Revision as of 07:09, 20 May 2008 by Zoon (Talk | contribs)

Jump to: navigation, search

I keep checking here for scripts but there ar'nt any, So I hope its ok, I thought i'd put the scripts that I've found that work.. It will i hope be obvious that they are not mine, and that i am not the author.

The scripts are gleemed from anywhere open source, and my thanks go out to all those bright people who write this stuff :-)

I am running opensim from the svn (Latest build daily) thing, then compile it in visual studio it occasionally wants to update the code to 2008 vers so i let it :-) where possible i will show the author and a link :-)Any problems let me know zoon@edenrealm.co.uk copy all below the "heading" into a new script in your in-world inventory, then drag and drop into your prim..... as if you didnt know :-) Samantha can be located on Openlife grid, Oh yes, i have played with the settings a little

Contents

Particles

// *** Fountian Particles *** // *** by Samantha Fuller *** // *** ver 1 for OLG alpha .5 - March 5 /08 ***


integer on;

start_particles() {

   llParticleSystem([
   PSYS_PART_FLAGS, PSYS_PART_EMISSIVE_MASK //PSYS_PART_TARGET_POS_MASK 
   | PSYS_PART_INTERP_COLOR_MASK | PSYS_PART_INTERP_SCALE_MASK, //| PSYS_PART_WIND_MASK,//PSYS_PART_FOLLOW_VELOCITY_MASK,
   PSYS_SRC_PATTERN,

// *** Choose 1 pattern from the following ***

   // PSYS_SRC_PATTERN_EXPLODE,
    PSYS_SRC_PATTERN_DROP,
   //PSYS_SRC_PATTERN_ANGLE_CONE_EMPTY,
   //PSYS_SRC_PATTERN_ANGLE_CONE,
    //PSYS_SRC_PATTERN_ANGLE,
   PSYS_SRC_ANGLE_BEGIN, 5.015, 
   PSYS_SRC_ANGLE_END, 10.5,
   PSYS_PART_START_SCALE, <0.1, 0.3, 0.1>,
   PSYS_PART_END_SCALE, <5.05,5.05,5.05>,
   PSYS_PART_START_ALPHA, .9,
   PSYS_PART_END_ALPHA, 0.05,
   PSYS_PART_START_COLOR, <1.0, 1.0, 1.0>,
   PSYS_PART_END_COLOR, <1.0, 0.0, 1.0>,
   PSYS_PART_MAX_AGE, 5.5,
   PSYS_SRC_ACCEL, < 0.0, 0.0, 0.2>,
   PSYS_SRC_BURST_RATE, 0.500,
   PSYS_SRC_BURST_PART_COUNT, 10,
   PSYS_SRC_BURST_RADIUS, 1.075,
   PSYS_SRC_BURST_SPEED_MAX, 2,
   PSYS_SRC_BURST_SPEED_MIN, 1,
   PSYS_SRC_TARGET_KEY, llGetKey()
   ]);

}


default {

   state_entry()
   {
       start_particles();
       llSleep(6);
       //llParticleSystem([]);
       llWhisper(0,"particle change");
   }
touch_start(integer touches)
   {
       if (on == 0)
       {
           on = 1;
           start_particles();
           llWhisper(0,"fountian on");
       }
       else
       {
           on = 0;
           llParticleSystem([]);
           llWhisper(0,"fountian off");
       }
   }

}


Sound loop

default {

   state_entry()
   {
       llSetTimerEvent(9.9);
       llSay(0,"reset.");
   }
   
   timer()
   {
       llPlaySound("rightclick on your sound and copy the UUID here, with care",1.0);
   }

}


Smooth rotate texture

default {

   state_entry()                                   
   {                                               
      float SPEED = 0.2; 
      llSetTextureAnim(ANIM_ON | SMOOTH | LOOP, ALL_SIDES, 0, 0, 1.0, 1000, SPEED);
   }

}


Sit and position

Just drop into an object and plat with the vector rot stuff and llsitTarget till happy :-)


default { state_entry() {

       llSetText("sit here ", <0,1,0>,1);

llSay(0,"started"); vector rot=<180.0, -180.0, 0.0>*DEG_TO_RAD; rotation finalrot=llEuler2Rot(rot); llSitTarget(<-0.35, 0.0, 0.75>,finalrot); } }

Subcategories

This category has the following 2 subcategories, out of 2 total.

Personal tools
General
About This Wiki