Advertisement
Jym_Nova

particle on/off with chat

Nov 22nd, 2014
448
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // Written By: Ĵyм Ѡҩℓƒ (Jym Resident)
  2. /*
  3. LICENCE:
  4. This program is free software: you can redistribute it and/or modify
  5. it under the terms of the GNU General Public License as published by
  6. the Free Software Foundation, either version 3 of the License, or
  7. any later version.
  8.  
  9. This program is distributed in the hope that it will be useful,
  10. but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  12. GNU General Public License for more details.
  13.  
  14. You should have received a copy of the GNU General Public License
  15. along with this program.  If not, see <http://www.gnu.org/licenses/>.
  16. or you may visit - http://license.idjhost.com/
  17. */
  18. // DESCRIPTION
  19. // Particles switch - Starting and Stopping particles by chat command
  20.  
  21. default
  22. {
  23.         state_entry()
  24.     {
  25.         listen(llListen(-1, "", NULL_KEY, ""); //Negative channel is best to listen on
  26.     }
  27.     listen(integer channel, string name, key id, string msg)
  28.     {
  29.             if(msg == "Shine")
  30.             {
  31.                 llParticleSystem(
  32.                 [
  33.                     PSYS_SRC_PATTERN,PSYS_SRC_PATTERN_ANGLE_CONE,
  34.                     PSYS_SRC_BURST_RADIUS,0.4,
  35.                     PSYS_SRC_ANGLE_BEGIN,0.125,
  36.                     PSYS_SRC_ANGLE_END,0,
  37.                     PSYS_SRC_TARGET_KEY,llGetKey(),
  38.                     PSYS_PART_START_COLOR,<1.000000,1.000000,1.000000>,
  39.                     PSYS_PART_END_COLOR,<1.000000,1.000000,1.000000>,
  40.                     PSYS_PART_START_ALPHA,0.0,
  41.                     PSYS_PART_END_ALPHA,0.1,
  42.                     PSYS_PART_START_GLOW,0,
  43.                     PSYS_PART_END_GLOW,0.0125,
  44.                     PSYS_PART_BLEND_FUNC_SOURCE,PSYS_PART_BF_SOURCE_ALPHA,
  45.                     PSYS_PART_BLEND_FUNC_DEST,PSYS_PART_BF_ONE_MINUS_SOURCE_ALPHA,
  46.                     PSYS_PART_START_SCALE,<0.031250,0.500000,0.000000>,
  47.                     PSYS_PART_END_SCALE,<0.031250,2.500000,0.000000>,
  48.                     PSYS_SRC_TEXTURE,"",
  49.                     PSYS_SRC_MAX_AGE,0,
  50.                     PSYS_PART_MAX_AGE,1.5,
  51.                     PSYS_SRC_BURST_RATE,0,
  52.                     PSYS_SRC_BURST_PART_COUNT,1,
  53.                     PSYS_SRC_ACCEL,<0.000000,0.000000,0.000000>,
  54.                     PSYS_SRC_OMEGA,<0.000000,0.000000,0.000000>,
  55.                     PSYS_SRC_BURST_SPEED_MIN,0.5,
  56.                     PSYS_SRC_BURST_SPEED_MAX,1.5,
  57.                     PSYS_PART_FLAGS,
  58.                         0 |
  59.                         PSYS_PART_EMISSIVE_MASK |
  60.                         PSYS_PART_FOLLOW_VELOCITY_MASK |
  61.                         PSYS_PART_INTERP_COLOR_MASK |
  62.                         PSYS_PART_INTERP_SCALE_MASK
  63.                 ]);
  64.         }
  65.         else if(msg == "dull")
  66.         {
  67.             llParticleSystem([]);
  68.         }
  69.     }
  70. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement