PSYS Template
Revision as of 04:18, 9 July 2009 by BETLOG Hax (talk | contribs)
LSL Portal | Functions | Events | Types | Operators | Constants | Flow Control | Script Library | Categorized Library | Tutorials |
PSYS Template
--BETLOG Hax UTC+10: 20090709 2208 [SLT: 20090709 0508]
All of the flags for making particles in a script with important inter-relationship comments only.
(declaring a bunch of variables instead of just learning to read the actual flag names is stupid)
<lsl>
//----------------------------------
integer gOn = TRUE;
//----------------------------------
default
{ on_rez(integer param)
{ llResetScript(); } touch_start(integer num_detected) { gOn = !gOn; state cycle; } state_entry() { if(gOn) { llParticleSystem( [ PSYS_PART_FLAGS, ( 0 | PSYS_PART_INTERP_COLOR_MASK | PSYS_PART_INTERP_SCALE_MASK | PSYS_PART_EMISSIVE_MASK // | PSYS_PART_WIND_MASK // | PSYS_PART_BOUNCE_MASK // | PSYS_PART_FOLLOW_SRC_MASK //disables BURST_RADIUS // | PSYS_PART_FOLLOW_VELOCITY_MASK // | PSYS_PART_TARGET_POS_MASK //target TARGET_KEY // | PSYS_PART_TARGET_LINEAR_MASK //requires TARGET_KEY disables ACCEL, BURST_RADIUS ) ,PSYS_PART_START_COLOR, <1.0, 0.5, 0.0> ,PSYS_PART_START_ALPHA, 1.0 ,PSYS_PART_END_COLOR, <0.3, 0.0, 0.0> ,PSYS_PART_END_ALPHA, 0.0 ,PSYS_PART_START_SCALE, <0.5, 0.5, 0> ,PSYS_PART_END_SCALE, <0.5, 0.5, 0> ,PSYS_PART_MAX_AGE, 1.0 //particle age ,PSYS_SRC_ACCEL, <0.0, 0.0, 0.0> ,PSYS_SRC_PATTERN, 8 //1=DROP,2=EXPLODE,4=ANGLE,8=ANGLE_CONE,10=ANGLE_CONE_EMPTY //1 - disables BURST_RADIUS, BURST_SPEED_MIN, BURST_SPEED_MAX //4/8/10 - requires ANGLE_BEGIN, ANGLE_END // ,PSYS_SRC_INNERANGLE, DEPRECIATED // ,PSYS_SRC_OUTERANGLE, DEPRECIATED ,PSYS_SRC_TEXTURE, "" // llGetInventoryName(INVENTORY_TEXTURE, 0) ,PSYS_SRC_BURST_RATE, 0.05 // ,14, UNDOCUMENTED ,PSYS_SRC_BURST_PART_COUNT, 4 ,PSYS_SRC_BURST_RADIUS, 1.0 ,PSYS_SRC_BURST_SPEED_MIN, 0.0 ,PSYS_SRC_BURST_SPEED_MAX, 0.1 ,PSYS_SRC_MAX_AGE, 0.0 //emission duration ,PSYS_SRC_TARGET_KEY, (key)"" // llGetLinkKey(llGetLinkNum() + 1) // llGetKey() ,PSYS_SRC_OMEGA, <0.0, 0.0, 0.0> ,PSYS_SRC_ANGLE_BEGIN, 0.5 ,PSYS_SRC_ANGLE_END, 0.5 ]); } else { llParticleSystem([]); } }
} //---------------------------------- state cycle { state_entry()
{ state default; }
} //---------------------------------- </lsl>