Particle Targeting

Thread Started By deadpool

2584
0
  • 39 Vote(s) - 3.08 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Rate Thread
#1
How-to/Info:

•Copy paste the scripts below into new scripts inworld.
•Save it & then put them into separate objects (if not there already).
•Touch the object with the Give Key script.
•The Particle Script should now have it’s particle streaming towards the ‘Give Key’ object.

Give Key Script
PHP Code:
integer our_channel = -1212123;
default{
    
touch_start(integer total_number){
        
llSay(our_channel"Key="+(string)llGetKey());
    }


Particle Script
PHP Code:
//We listen on this channel for our target key
integer our_channel = -1212123;
//Message we listen for "Key=b31b25aa-de... etc". The = symbol being the seperator.
 
//Particle Params
key target;
integer glow TRUE;           
integer bounce FALSE;         
integer interpColor TRUE;    
integer interpSize TRUE;      
integer wind FALSE;           
integer followSource FALSE;    
integer followVel TRUE;       
integer pattern PSYS_SRC_PATTERN_ANGLE_CONE;
float age 5.0;                  
float maxSpeed 1.5;            
float minSpeed 0.5;           
string texture "b31b25aa-de9a-32d7-7c3d-6cfb997c37ba";                 
float startAlpha 1.0;           
float endAlpha 1.0;           
vector startColor = <1,1,1>;    
vector endColor = <0,0,0>;     
vector startSize = <0.0,0.0,0.0>;    
vector endSize = <0.1,0.1,0.0>;       
vector push = <0,0,0>;          
float rate 0.01;           
float radius 0.0;         
integer count 1000;        
float outerAngle 1.55;   
float innerAngle 1.55;   
vector omega = <20,20,20>;    
float life 0;             
integer flags;
set_particles(){
    if (
glowflags flags PSYS_PART_EMISSIVE_MASK;
    if (
bounceflags flags PSYS_PART_BOUNCE_MASK;
    if (
interpColorflags flags PSYS_PART_INTERP_COLOR_MASK;
    if (
interpSizeflags flags PSYS_PART_INTERP_SCALE_MASK;
    if (
windflags flags PSYS_PART_WIND_MASK;
    if (
followSourceflags flags PSYS_PART_FOLLOW_SRC_MASK;
    if (
followVelflags flags PSYS_PART_FOLLOW_VELOCITY_MASK;
    if (
target != ""flags flags PSYS_PART_TARGET_POS_MASK;
    
llParticleSystem([  
        
PSYS_PART_MAX_AGE,age,
        
PSYS_PART_FLAGS,flags,
        
PSYS_PART_START_COLORstartColor,
        
PSYS_PART_END_COLORendColor,
        
PSYS_PART_START_SCALE,startSize,
        
PSYS_PART_END_SCALE,endSize
        
PSYS_SRC_PATTERNpattern,
        
PSYS_SRC_BURST_RATE,rate,
        
PSYS_SRC_ACCELpush,
        
PSYS_SRC_BURST_PART_COUNT,count,
        
PSYS_SRC_BURST_RADIUS,radius,
        
PSYS_SRC_BURST_SPEED_MIN,minSpeed,
        
PSYS_SRC_BURST_SPEED_MAX,maxSpeed,
        
PSYS_SRC_TARGET_KEY,target,
        
PSYS_SRC_INNERANGLE,innerAngle
        
PSYS_SRC_OUTERANGLE,outerAngle,
        
PSYS_SRC_OMEGAomega,
        
PSYS_SRC_MAX_AGElife,
        
PSYS_SRC_TEXTUREtexture,
        
PSYS_PART_START_ALPHAstartAlpha,
        
PSYS_PART_END_ALPHAendAlpha]);
}
 
default{
//
    
state_entry(){
        
llListen(our_channel"","","");
        
set_particles();
    }
//
    
listen(integer channelstring namekey idstring message){
        if (
channel == our_channel){
            list 
cmd_list llParseString2List(message, ["="], []);
            
string cmd0 llList2String(cmd_list0);
            
string cmd1 llList2String(cmd_list1);
            if(
cmd0 == "Key"){
                
target = (key)cmd1;
                
set_particles();
            }
        }
    }
//

Reply




Possibly Related Threads…
Thread Author Replies Views Last Post
  Particle Glitching Effects maxio 0 571 10-06-2019, 06:57 PM
Last Post: maxio
  Particle aura monsterx3000 0 1,122 09-04-2018, 09:56 PM
Last Post: monsterx3000
  electricity shaped lightning particle Berkeley 1 1,782 07-11-2018, 04:53 AM
Last Post: SANEK9698
  Lightning particle Berkeley 0 1,286 07-04-2018, 12:05 PM
Last Post: Berkeley
  Particle Generator ZeroThe10th 5 6,978 05-07-2018, 11:30 AM
Last Post: Credair
  GLE's Flying Faggot Particle NigronPr1m3 1 3,157 03-14-2018, 08:57 AM
Last Post: ELiteRose
  Nice "star" rain type particle NaTaS 2 4,223 09-28-2016, 03:46 PM
Last Post: max144
  Red Firefly Particle ☠ MosDef ☠ 0 2,385 02-20-2013, 11:07 PM
Last Post: ☠ MosDef ☠
  Particle Positioning-Garden deadpool 0 2,344 02-19-2013, 02:26 AM
Last Post: deadpool

Forum Jump:

1 Guest(s)
Share this:

About Second Life Copybot

Second Life CopyBot Forum is a place where you can get items for Second Life and other vitual worlds for free. With our CopyBot viewers you can export and import any content from these virtual worlds and modify them in 3D software such as Blender, 3D studio Macx etc...