Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Getting particles to come out of my objects towards someone I pick.

Aaron Levy
Medicated Lately?
Join date: 3 Jun 2004
Posts: 2,147
10-02-2005 15:02
I can't get the syntax right to make my object spew particles at a person of my choosing.

This is greek to me:

I'm trying to go by the wiki, but the wiki is obviously written for programmers, which I am not.

"Parameter pairs (always one constant followed by parameter of specified type):"

"PSYS_PART_FLAGS followed by an integer bitfield with one or more of the following constants OR'ed together:"

Yeah.

Can someone lend a hand, please?
Jillian Callahan
Rotary-winged Neko Girl
Join date: 24 Jun 2004
Posts: 3,766
10-02-2005 16:18
From: Aaron Levy
Can someone lend a hand, please?
Yesh.
CODE
//Subroutines
start_particles(key target)
{
llParticleSystem([
PSYS_PART_FLAGS, PSYS_PART_EMISSIVE_MASK | PSYS_PART_TARGET_POS_MASK | PSYS_PART_INTERP_COLOR_MASK | PSYS_PART_INTERP_SCALE_MASK | PSYS_PART_FOLLOW_VELOCITY_MASK | PSYS_PART_FOLLOW_SRC_MASK,
PSYS_SRC_PATTERN, PSYS_SRC_PATTERN_EXPLODE,
PSYS_PART_START_SCALE, <0.15, 0.15, 0>,
PSYS_PART_END_SCALE, <0.25, 0.25, 0>,
PSYS_PART_START_ALPHA, 1.0,
PSYS_PART_END_ALPHA, 1.0,
PSYS_PART_START_COLOR, <0,0,1>,
PSYS_PART_END_COLOR, <1,0,0>,
PSYS_PART_MAX_AGE, 5.0,
PSYS_SRC_BURST_RATE, 0.1,
PSYS_SRC_BURST_PART_COUNT, 1,
PSYS_SRC_BURST_RADIUS, 0.1,
PSYS_SRC_BURST_SPEED_MAX, 0.02,
PSYS_SRC_BURST_SPEED_MIN, 0.01,
PSYS_SRC_TARGET_KEY, target
]);
}
Sends a stream from the prim to target.
I broke up the list into the "pairs" mentioned in the Wiki, easier to read. :)
_____________________
Zodiakos Absolute
With a a dash of lemon.
Join date: 6 Jun 2005
Posts: 282
10-03-2005 12:53
Also, because someone is bound to ask about it...

In that example, 'target' is a key, a UUID for someone's avatar, preumably. If you are wanting to spit out particles at a particular person, on command, you are going to need some way of getting that target's key.

Such as this : http://secondlife.com/badgeo/wakka.php?wakka=sensors.

The llSensor function (and related event, sensor) allow you to search around an area you specify, and get the names, keys, and positions of various things (objects, avatars, up to 16 at a time). Using a sensor, you can easily get the key of an avatar you are searching for.