Join us in Outworldz at www.outworldz.com:9000 or follow us:

Search dozens of selected web sites for OpenSim and LSL script

New! Script Meta-Search will search thousands of scripts here and at other sites for LSL or Opensim scripts.
Loading

Want to add a script or a project? Upload it and a half million people will see it and your name here this year.

Home   Show All
Category: Contributor: Creator
Particles llGetAgentInfoparticle_poofer_examp  

llGetAgentInfoparticle_poofer_examp

llGetAgentInfoparticle_poofer_example

Category: Particles
By : Ferd Frederix
Created: 2010-01-10 Edited: 2010-01-10
Worlds: Second Life

the Zip file

Download all files for llGetAgentInfoparticle_poofer_examp
Contents are in zip format, with .LSL (text) source code and LSLEdit (text + Solution) formats.
Get file # 1. llGetAgentInfoparticle_poofer_examp_1.lsl

This script by Ferd Frederix may be used in any manner, modified, and republished.  Unless specified otherwise, my scripts are always free and open source.  Objects made with these scripts may be sold with no restrictions.  All I ask is that you point others to this location should they ask you about it and to not sell this script, unless it is for $0 L. Please help improve my work by reporting bugs and improvements.

1
2 //\x95/\x95/\x95/\x95/\x95/\x95/\x95/\xD0/A/M/E/N/\x95/H/A/X/\x95/\x95/\x95/\x95/\x95/\x95/\x95/\x95/\x95//
3
4 //something i put together to use as a template for detecting diff AGENT INFO things
5 //eg usage; make particles when you walk, have different particles start when you fly etc.
6
7 key owner;
8 key target;
9 integer dChannel;
10
11 key sub;
12 integer info;
13 //Particles
14 integer flags;
15 integer glow = TRUE;
16 integer bounce = FALSE;
17 integer interpColor = TRUE;
18 integer interpSize = TRUE;
19 integer wind = FALSE;
20 integer followSource = FALSE;
21 integer followVel = TRUE;
22
23 flying(){
24 //llSay(0,"flying");
25 flags = 0;
26 if(target == "me") target = owner;
27 if(target == "object") target = llGetKey();
28 if(glow) flags = flags | PSYS_PART_EMISSIVE_MASK;
29 if(bounce) flags = flags | PSYS_PART_BOUNCE_MASK;
30 if(interpColor) flags = flags | PSYS_PART_INTERP_COLOR_MASK;
31 if(interpSize) flags = flags | PSYS_PART_INTERP_SCALE_MASK;
32 if(wind) flags = flags | PSYS_PART_WIND_MASK;
33 if(followSource) flags = flags | PSYS_PART_FOLLOW_SRC_MASK;
34 if(followVel) flags = flags | PSYS_PART_FOLLOW_VELOCITY_MASK;
35 if(target != "") flags = flags | PSYS_PART_TARGET_POS_MASK;
36 llParticleSystem([ PSYS_PART_MAX_AGE, 0.85,//Particle age
37 PSYS_PART_FLAGS, flags,//Flags^
38 PSYS_SRC_PATTERN, PSYS_SRC_PATTERN_EXPLODE,//Particle pattern
39 PSYS_SRC_BURST_RATE, 0.00,//Burst rate/how fast to emitt
40 PSYS_SRC_ACCEL, <0.0,0.0,0.0>,//Push <X,Y,X>
41 PSYS_SRC_BURST_PART_COUNT, 66,//How many to emitt
42 PSYS_SRC_TARGET_KEY, target,//Particle target
43 PSYS_SRC_INNERANGLE, 1.55,//Inner angle
44 PSYS_SRC_OUTERANGLE, 1.54,//Outer angle
45 PSYS_SRC_BURST_SPEED_MIN, 0.01,//Min Speed
46 PSYS_SRC_BURST_SPEED_MAX, 0.10,//Max Speed
47 PSYS_SRC_OMEGA, <0.0,0.0,0.0>,//Rotation
48 PSYS_SRC_TEXTURE,"34d7dc0f-ca85-402f-8a40-0ded9cdf4f5b",//Particle texture
49 PSYS_SRC_MAX_AGE, 0.0,//How long to wait before stopping
50 PSYS_SRC_BURST_RADIUS, 4.50,//how far to begin emitting
51 PSYS_PART_START_COLOR, <0.55,0.75,1.55>,//Starting color
52 PSYS_PART_END_COLOR, <0.01,0.01,0.01>,//Ending color
53 PSYS_PART_START_SCALE, <0.04,0.04,0.04>,//Start size
54 PSYS_PART_END_SCALE, <0.05,1.55,0.05>,//End size
55 PSYS_PART_START_ALPHA, 1.0,//Starting visibility
56 PSYS_PART_END_ALPHA, 0.0//Ending visibility
57 ]);
58 }
59 /////////////////////////////////
60 walking(){
61 //llSay(0,"walking");
63 }
64 ////////////////////////////////
65 away(){
66 //llSay(0,"afk");
67 flags = 0;
68 if(target == "me") target = owner;
69 if(target == "object") target = llGetKey();
70 if(glow) flags = flags | PSYS_PART_EMISSIVE_MASK;
71 if(bounce) flags = flags | PSYS_PART_BOUNCE_MASK;
72 if(interpColor) flags = flags | PSYS_PART_INTERP_COLOR_MASK;
73 if(interpSize) flags = flags | PSYS_PART_INTERP_SCALE_MASK;
74 if(wind) flags = flags | PSYS_PART_WIND_MASK;
75 if(followSource) flags = flags | PSYS_PART_FOLLOW_SRC_MASK;
76 if(followVel) flags = flags | PSYS_PART_FOLLOW_VELOCITY_MASK;
77 if(target != "") flags = flags | PSYS_PART_TARGET_POS_MASK;
78 llParticleSystem([ PSYS_PART_MAX_AGE, 10.0,//Particle age
79 PSYS_PART_FLAGS, flags,//Flags^
80 PSYS_SRC_PATTERN, PSYS_SRC_PATTERN_EXPLODE,//Particle pattern
81 PSYS_SRC_BURST_RATE, 0.00,//Burst rate/how fast to emitt
82 PSYS_SRC_ACCEL, <0.0,0.0,0.47>,//Push <X,Y,X>
83 PSYS_SRC_BURST_PART_COUNT, 66,//How many to emitt
84 PSYS_SRC_TARGET_KEY, target,//Particle target
85 PSYS_SRC_INNERANGLE, 1.55,//Inner angle
86 PSYS_SRC_OUTERANGLE, 1.54,//Outer angle
87 PSYS_SRC_BURST_SPEED_MIN, 0.001,//Min Speed
88 PSYS_SRC_BURST_SPEED_MAX, 0.001,//Max Speed
89 PSYS_SRC_OMEGA, <0.0,0.0,0.0>,//Rotation
90 PSYS_SRC_TEXTURE,"9b0f8485-3b11-a9a3-7d16-3fccbcb2d7c0",//Particle texture
91 PSYS_SRC_MAX_AGE, 0.0,//How long to wait before stopping
92 PSYS_SRC_BURST_RADIUS, 2.50,//how far to begin emitting
93 PSYS_PART_START_COLOR, <1.00,1.00,1.00>,//Starting color
94 PSYS_PART_END_COLOR, <0.15,0.15,0.15>,//Ending color
95 PSYS_PART_START_SCALE, <0.04,0.04,0.04>,//Start size
96 PSYS_PART_END_SCALE, <2.22,2.22,2.22>,//End size
97 PSYS_PART_START_ALPHA, 1.0,//Starting visibility
98 PSYS_PART_END_ALPHA, 0.0//Ending visibility
99 ]);
100 }
101 ////////////////////////////////
102 nothing(){
103 //llSay(0,"Idle");
104 flags = 0;
105 if(target == "me") target = owner;
106 if(target == "object") target = llGetKey();
107 if(glow) flags = flags | PSYS_PART_EMISSIVE_MASK;
108 if(bounce) flags = flags | PSYS_PART_BOUNCE_MASK;
109 if(interpColor) flags = flags | PSYS_PART_INTERP_COLOR_MASK;
110 if(interpSize) flags = flags | PSYS_PART_INTERP_SCALE_MASK;
111 if(wind) flags = flags | PSYS_PART_WIND_MASK;
112 if(followSource) flags = flags | PSYS_PART_FOLLOW_SRC_MASK;
113 if(followVel) flags = flags | PSYS_PART_FOLLOW_VELOCITY_MASK;
114 if(target != "") flags = flags | PSYS_PART_TARGET_POS_MASK;
115 llParticleSystem([ PSYS_PART_MAX_AGE, 2.25,//Particle age
116 PSYS_PART_FLAGS, flags,//Flags^
117 PSYS_SRC_PATTERN, PSYS_SRC_PATTERN_EXPLODE,//Particle pattern
118 PSYS_SRC_BURST_RATE, 0.00,//Burst rate/how fast to emitt
119 PSYS_SRC_ACCEL, <0.0,0.0,0.47>,//Push <X,Y,X>
120 PSYS_SRC_BURST_PART_COUNT, 66,//How many to emitt
121 PSYS_SRC_TARGET_KEY, target,//Particle target
122 PSYS_SRC_INNERANGLE, 1.55,//Inner angle
123 PSYS_SRC_OUTERANGLE, 1.54,//Outer angle
124 PSYS_SRC_BURST_SPEED_MIN, 0.01,//Min Speed
125 PSYS_SRC_BURST_SPEED_MAX, 0.10,//Max Speed
126 PSYS_SRC_OMEGA, <0.0,0.0,0.0>,//Rotation
127 PSYS_SRC_TEXTURE,"b85073b6-d83f-43a3-9a89-cf882b239488",//Particle texture
128 PSYS_SRC_MAX_AGE, 0.0,//How long to wait before stopping
129 PSYS_SRC_BURST_RADIUS, 0.50,//how far to begin emitting
130 PSYS_PART_START_COLOR, <0.00,0.00,0.00>,//Starting color
131 PSYS_PART_END_COLOR, <0.15,0.15,0.15>,//Ending color
132 PSYS_PART_START_SCALE, <0.55,0.55,0.55>,//Start size
133 PSYS_PART_END_SCALE, <0.04,2.55,0.04>,//End size
134 PSYS_PART_START_ALPHA, 1.0,//Starting visibility
135 PSYS_PART_END_ALPHA, 0.0//Ending visibility
136 ]);
137 }
138
139 default{
140 state_entry() {
141 dChannel = 0;
142 target = "";
143 owner = llGetOwner();
144 llListen(dChannel,"",owner,"");//listens in public chat
145 llSetTimerEvent(0.2);
146 }
147 //
148 on_rez(integer tot){
149 llOwnerSay("Say on channel 1 \"stop\" & \"start\" for related effects.\n(eg; /1 stop .. or /1 start)");
150 }
151 //
152 listen(integer number, string name, key id, string m){
153 if(m=="stop"){
154 llSetTimerEvent(0.0);
156 }
157 else if(m=="start"){
158 llSetTimerEvent(0.1);
159 }
160 }
161 //
162 timer(){
163 integer flying = llGetAgentInfo(owner) & AGENT_FLYING;
164 integer walking = llGetAgentInfo(owner) & AGENT_WALKING;
165 integer away = llGetAgentInfo(owner) & AGENT_AWAY;
166 if(flying ){
167 flying();
168 }
169 else if(walking ){
170 walking();
171 }
172 else if(away ){
173 away();
174 }
175 else{
176 nothing();
177 }
178 }
179 //
180 changed(integer change){
181 if(change & CHANGED_OWNER){
183 }
184 }
185 //
186 }

Back to the Best Free Tools in Second Life and OpenSim.