redbubbles.lslp 3.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. //
  2. // The line above should be left blank to avoid script errors in OpenSim.
  3. /*
  4. * Part of the Sloodle project (www.sloodle.org)
  5. *
  6. * Copyright (c) 2011-06 contributors (see below)
  7. * Released under the GNU GPL v3
  8. * -------------------------------------------
  9. *
  10. * This program is free software: you can redistribute it and/or modify
  11. * it under the terms of the GNU General Public License as published by
  12. * the Free Software Foundation, either version 3 of the License, or
  13. * (at your option) any later version.
  14. *
  15. *
  16. * This program is distributed in the hope that it will be useful,
  17. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  18. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  19. * GNU General Public License for more details.
  20. * You should have received a copy of the GNU General Public License
  21. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  22. *
  23. * All scripts must maintain this copyrite information, including the contributer information listed
  24. *
  25. * As mentioned, this script has been licensed under GPL 3.0
  26. * Basically, that means, you are free to use the script, commercially etc, but if you include
  27. * it in your objects, you must make the source viewable to the person you are distributuing it to -
  28. * ie: it can not be closed source - GPL 3.0 means - you must make it open!
  29. * This is so that others can modify it and contribute back to the community.
  30. * The SLOODLE github can be found here: https://github.com/sloodle
  31. *
  32. * Enjoy!
  33. *
  34. * Contributors:
  35. * Paul Preibisch
  36. * Edmund Edgar
  37. *
  38. * DESCRIPTION
  39. * displays bloody red bubbles for 5 seconds then disapears - used for sharks and other under water enemies to rez blood effects
  40. */
  41. integer SLOODLE_CHANNEL_ENEMY_ATTACK= -163928666;//Channel to communicate on when attack occurs by an enemy
  42. redBubbles(){
  43. llParticleSystem([PSYS_PART_MAX_AGE,1.20,
  44. PSYS_PART_FLAGS, 259,
  45. PSYS_PART_START_COLOR, <0.89235, 0.04807, 0.25145>,
  46. PSYS_PART_END_COLOR, <0.91157, 0.04489, 0.21028>,
  47. PSYS_PART_START_SCALE,<0.20782, 0.25554, 0.00000>,
  48. PSYS_PART_END_SCALE,<0.22479, 0.20700, 0.00000>,
  49. PSYS_SRC_PATTERN, 2,
  50. PSYS_SRC_BURST_RATE,0.00,
  51. PSYS_SRC_ACCEL, <0.00000, 0.00000, 0.51501>,
  52. PSYS_SRC_BURST_PART_COUNT,133,
  53. PSYS_SRC_BURST_RADIUS,0.00,
  54. PSYS_SRC_BURST_SPEED_MIN,0.05,
  55. PSYS_SRC_BURST_SPEED_MAX,0.64,
  56. PSYS_SRC_ANGLE_BEGIN, 0.00,
  57. PSYS_SRC_ANGLE_END, 0.00,
  58. PSYS_SRC_OMEGA, <0.00000, 0.00000, 0.72661>,
  59. PSYS_SRC_MAX_AGE, 0.0,
  60. PSYS_SRC_TEXTURE, "TEXTURE_BUBBLE",
  61. PSYS_PART_START_ALPHA, 0.07,
  62. PSYS_PART_END_ALPHA, 0.66]);
  63. }
  64. particles_off(){
  65. llParticleSystem([]);
  66. }
  67. integer counter=0;
  68. default {
  69. on_rez(integer start_param) {
  70. llResetScript();
  71. }
  72. state_entry() {
  73. particles_off();
  74. }
  75. link_message(integer sender_num, integer num, string str, key id) {
  76. if (num==SLOODLE_CHANNEL_ENEMY_ATTACK){
  77. llTriggerSound("SND_BUBBLES", 1);
  78. redBubbles();
  79. llSetTimerEvent(3);
  80. }
  81. }
  82. timer() {
  83. particles_off();
  84. llSetTimerEvent(0);
  85. }
  86. }
  87. // Please leave the following line intact to show where the script lives in Git:
  88. // SLOODLE LSL Script Git Location: mod/gaming-1.0/objects/shark/assets/redbubbles.lslp