Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- integer firing;
- fire()
- {
- if (!firing){
- firing = TRUE;
- llParticleSystem(
- [
- PSYS_PART_FLAGS,
- 0 |
- PSYS_PART_BOUNCE_MASK |
- PSYS_PART_EMISSIVE_MASK |
- PSYS_PART_FOLLOW_SRC_MASK |
- PSYS_PART_FOLLOW_VELOCITY_MASK |
- PSYS_PART_INTERP_SCALE_MASK,
- PSYS_PART_START_COLOR, <1.0, 1.0, 0.0>,
- PSYS_PART_END_COLOR, <1.0, 1.0, 0.0>,
- PSYS_PART_START_ALPHA, 1,
- PSYS_PART_END_ALPHA, 1,
- PSYS_PART_START_GLOW, 1,
- PSYS_PART_END_GLOW, 0,
- PSYS_PART_BLEND_FUNC_SOURCE,
- PSYS_PART_BF_SOURCE_ALPHA,
- PSYS_PART_BLEND_FUNC_DEST,
- PSYS_PART_BF_ONE_MINUS_SOURCE_ALPHA,
- PSYS_PART_START_SCALE, <0.1, 3.0, 0.0>,
- PSYS_PART_END_SCALE, <0.1, 4.0, 0.0>,
- PSYS_PART_MAX_AGE, .25,
- // PSYS_SRC_TARGET_KEY,llGetKey(),
- PSYS_SRC_TEXTURE, "3c7eb44d-7923-42f8-9cde-82c9322d8fe5",
- PSYS_SRC_MAX_AGE, 0,
- PSYS_SRC_BURST_RATE, 0.3,
- PSYS_SRC_BURST_PART_COUNT, 10,
- PSYS_SRC_ACCEL,<0.0, 0.0, 0.0>,
- PSYS_SRC_OMEGA,<0.0, 0.0, 0.0>,
- PSYS_SRC_BURST_SPEED_MIN ,0.5,
- PSYS_SRC_BURST_SPEED_MAX, 50.5,
- PSYS_SRC_PATTERN,
- PSYS_SRC_PATTERN_ANGLE,
- PSYS_SRC_BURST_RADIUS, 0,
- PSYS_SRC_ANGLE_BEGIN, 0,
- PSYS_SRC_ANGLE_END, 0
- ]);
- llSetTimerEvent(.2);
- }
- }
- ceaseFire()
- {
- firing = FALSE;
- llParticleSystem([]);
- llStopSound();
- }
- init(){
- firing = FALSE;
- llParticleSystem([]);
- llStopSound();
- }
- default
- {
- state_entry()
- {
- init();
- }
- on_rez(integer num)
- {
- init();
- }
- touch(integer num_detected){
- fire();
- }
- timer(){
- llSetTimerEvent(0);
- ceaseFire();
- }
- }
Advertisement
Advertisement