Jump to content

How do I start a script from within another script


Gator Peterman
 Share

You are about to reply to a thread that has been inactive for 4052 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

I have bought a script that starts emitting particles (smoke) when its called from another script.

Its a boat script placed in an exhaust pipe which starts emitting smoke particles when the boat is driving (looks neat).

The emitting script I cannot change, but the calling boat control script I can modify.

So my question, is there an easy way to have the boat scrip start the emitting script.

Both are linked, the root prim and the exhaust prim with the emitting script.

Hope this makes sense...ty

Link to comment
Share on other sites

Here is a basic particle smoke effect that you can implement in your boat control script and modify to your liking:

 

llParticleSystem([            PSYS_PART_FLAGS , 0 //Comment out any of the following masks to deactivate them        //| PSYS_PART_WIND_MASK             //Particles are moved by wind        | PSYS_PART_INTERP_COLOR_MASK       //Colors fade from start to end        | PSYS_PART_INTERP_SCALE_MASK       //Scale fades from beginning to end        | PSYS_PART_FOLLOW_SRC_MASK         //Particles follow the emitter        | PSYS_PART_FOLLOW_VELOCITY_MASK    //Particles are created at the velocity of the emitter        ,PSYS_SRC_PATTERN,           PSYS_SRC_PATTERN_ANGLE_CONE                ,PSYS_SRC_TEXTURE,           "2ca57748-4944-de53-b301-8d0efbafb2c6"             ,PSYS_PART_MAX_AGE,          3.8               //Lifetime, in seconds, that a particle lasts        ,PSYS_SRC_BURST_RATE,        0.03               //How long, in seconds, between each emission        ,PSYS_SRC_BURST_PART_COUNT,  1                  //Number of particles per emission        ,PSYS_SRC_BURST_RADIUS,      0.1                //Radius of emission        ,PSYS_SRC_BURST_SPEED_MIN,   0.1               //Minimum speed of an emitted particle        ,PSYS_SRC_BURST_SPEED_MAX,   0.5                //Maximum speed of an emitted particle        ,PSYS_SRC_ACCEL,             <0.0,0.0,0.6>      //Acceleration of particles each second        ,PSYS_PART_START_COLOR,      <0.5,0.5,0.5>      //Starting RGB color        ,PSYS_PART_END_COLOR,        <0.1,0.1,0.1>      //Ending RGB color, if INTERP_COLOR_MASK is on         ,PSYS_PART_START_ALPHA,      0.6                ,PSYS_PART_END_ALPHA,        0.0                //Ending transparency        ,PSYS_PART_START_SCALE,      <0.1,0.1,0.0>      //Starting particle size        ,PSYS_PART_END_SCALE,        <1,1,0.0>              ,PSYS_SRC_ANGLE_BEGIN,       -.01                //Inner angle for ANGLE patterns        ,PSYS_SRC_ANGLE_END,         .01             //Outer angle for ANGLE patterns        ,PSYS_SRC_OMEGA,             <0.0,0.0,0.0>     ]);

 

Use llParticleSystem([]); to deactivate the particle effect.

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 4052 days.

Please take a moment to consider if this thread is worth bumping.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...