Jump to content

Target key, particles, linkset


Tattooshop
 Share

You are about to reply to a thread that has been inactive for 1397 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

Hello! I am making a particle system for a linkset where the particles go from bottom to top towards the target, but when I link them there is a problem, the particles do not go to the target. how to correctly specify the target for a linkset in this case? ( Target link number is 2 )

:D

 

integer link;
default
{
    state_entry()
    {
        key target = llGetLinkKey(2);
        llLinkParticleSystem(link, [PSYS_PART_MAX_AGE, 3.00,
            PSYS_PART_FLAGS, 327,
            PSYS_PART_START_COLOR, < 0.80900, 0.61643, 0.19086 > ,
            PSYS_PART_END_COLOR, < 0.95090, 0.23954, 0.04910 > ,
            PSYS_PART_START_SCALE, < 0.22837, 0.22108, 0.00000 > ,
            PSYS_PART_END_SCALE, < 0.40827, 0.38748, 0.00000 > ,
            PSYS_SRC_PATTERN, 2,
            PSYS_SRC_BURST_RATE, 0.00,
            PSYS_SRC_BURST_PART_COUNT, 6,
            PSYS_SRC_BURST_RADIUS, 1.47,
            PSYS_SRC_BURST_SPEED_MIN, 0.08,
            PSYS_SRC_BURST_SPEED_MAX, 0.02,
            PSYS_SRC_ANGLE_BEGIN, 0.95,
            PSYS_SRC_ANGLE_END, 0.00,
            PSYS_SRC_MAX_AGE, 0.0,
            PSYS_SRC_TEXTURE, "208da827-c002-c83f-2e9e-c0d4abee9c3e",
            PSYS_PART_START_ALPHA, 1.00,
            PSYS_PART_END_ALPHA, 1.00,
            PSYS_SRC_ACCEL, < 0.00, 0.00, 0.42 > ,
            PSYS_PART_START_GLOW, 0.10,
            PSYS_PART_END_GLOW, 0.00,
            PSYS_SRC_TARGET_KEY, target
        ]);
    }
}

 

Snapshot_001.png

Edited by Tattooshop
Link to comment
Share on other sites

13 minutes ago, sandi Mexicola said:

Ah!  OK, I got it!  :)  I am not a scripter expert or a particle expert... but until someone comes along with a better answer... if it were me... I would put an llOwnerSay(); to tell me what the value of "target" really is, and then just check by clicking and editing the link.  

Thanks! I'm sure the number is 2, I even tried this version with timer but now it doesn't work at all, no particles :(

system()
{
    llLinkParticleSystem(link, [PSYS_PART_MAX_AGE, 3.00,
        PSYS_PART_FLAGS, 327,
        PSYS_PART_START_COLOR, < 0.80900, 0.61643, 0.19086 > ,
        PSYS_PART_END_COLOR, < 0.95090, 0.23954, 0.04910 > ,
        PSYS_PART_START_SCALE, < 0.22837, 0.22108, 0.00000 > ,
        PSYS_PART_END_SCALE, < 0.40827, 0.38748, 0.00000 > ,
        PSYS_SRC_PATTERN, 2,
        PSYS_SRC_BURST_RATE, 0.00,
        PSYS_SRC_BURST_PART_COUNT, 6,
        PSYS_SRC_BURST_RADIUS, 1.47,
        PSYS_SRC_BURST_SPEED_MIN, 0.08,
        PSYS_SRC_BURST_SPEED_MAX, 0.02,
        PSYS_SRC_ANGLE_BEGIN, 0.95,
        PSYS_SRC_ANGLE_END, 0.00,
        PSYS_SRC_MAX_AGE, 0.0,
        PSYS_SRC_TEXTURE, "208da827-c002-c83f-2e9e-c0d4abee9c3e",
        PSYS_PART_START_ALPHA, 1.00,
        PSYS_PART_END_ALPHA, 1.00,
        PSYS_SRC_ACCEL, < 0.00, 0.00, 0.42 > ,
        PSYS_PART_START_GLOW, 0.10,
        PSYS_PART_END_GLOW, 0.00,
        PSYS_SRC_TARGET_KEY, llGetLinkKey(llGetLinkNumber() + 1)
    ]);
}

integer link;
default
{
    state_entry()
    {
        llSetTimerEvent(1);
    }
    timer()
    {
        system();
    }
}

 

Link to comment
Share on other sites

I believe I have made almost the exact same setup as you, but I need to head in-world and check what I did, and I won't be able to do that for a while.  Well, I did not put in a timer! :)  

If someone smart doesn't come along and answer this before I get a chance, I'll go in-world and see what I have done. :)

Also (2) isn't a valid key for a prim.  

Link to comment
Share on other sites

 

To decode the 327 for PSYS_PART_FLAGS:

PSYS_PART_INTERP_COLOR_MASK
| PSYS_PART_INTERP_SCALE_MASK
| PSYS_PART_BOUNCE_MASK
| PSYS_PART_TARGET_POS_MASK
| PSYS_PART_EMISSIVE_MASK

Okay, so at least it should be trying to target the target key.

But it won't work because it's calling llLinkParticleSystem() with a 0-valued link argument, and a linkset with child links starts with 1. Replace that with LINK_THIS and see what happens.

 

  • Thanks 2
Link to comment
Share on other sites

1 hour ago, Qie Niangao said:

 

To decode the 327 for PSYS_PART_FLAGS:

PSYS_PART_INTERP_COLOR_MASK
| PSYS_PART_INTERP_SCALE_MASK
| PSYS_PART_BOUNCE_MASK
| PSYS_PART_TARGET_POS_MASK
| PSYS_PART_EMISSIVE_MASK

Okay, so at least it should be trying to target the target key.

But it won't work because it's calling llLinkParticleSystem() with a 0-valued link argument, and a linkset with child links starts with 1. Replace that with LINK_THIS and see what happens.

 

MAGIC! Thank you so much! :D

 

  • Like 1
Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 1397 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...