Miguelito Shilova Posted June 24, 2020 Share Posted June 24, 2020 Would anyone be able to share an example of a script that can connect two prims with a ribbon particle, and if one of those prims move, it stays 'connected' to the other prim via the ribbon particle? The idea is to emulate a rope and pulley system. Any help is greatly appreciated! The moving prim will be moved via another script. Thanks! --Mig Link to comment Share on other sites More sharing options...
KT Kingsley Posted June 24, 2020 Share Posted June 24, 2020 Here's a quick and dirty one I knocked up using the Firestorm particle editor: default { state_entry () { llParticleSystem ( [ PSYS_SRC_PATTERN, PSYS_SRC_PATTERN_EXPLODE, PSYS_SRC_BURST_RADIUS, 0, PSYS_SRC_TARGET_KEY, (key) "82cf77cb-4f0d-f1f9-1576-f0eb865f655f", PSYS_PART_START_SCALE, <0.100000,0.100000,0.000000>, PSYS_SRC_TEXTURE, "91bf2e0c-cbd0-dfa9-7ee9-30de7ded97fc", PSYS_PART_MAX_AGE, 10, PSYS_SRC_BURST_RATE, 1, PSYS_PART_FLAGS, PSYS_PART_TARGET_LINEAR_MASK | PSYS_PART_RIBBON_MASK ]); } } Replace the key specified for PSYS_SRC_TARGET_KEY with the key of your target object. Replace the key specified for PSYS_SRC_TEXTURE with the key of your rope texture. 1 Link to comment Share on other sites More sharing options...
Fenix Eldritch Posted June 24, 2020 Share Posted June 24, 2020 (edited) Configuring a particle stream to target another object needs two settings. First you need to enable the proper flags (either PSYS_PART_TARGET_LINEAR_MASK or PSYS_PART_TARGET_POS_MASK). Then you need to use the PSYS_SRC_TARGET_KEY parameter paired with the uuid of the object you want to target. Changing the stream to a ribbon similarly needs to have a special flag set, the PSYS_PART_RIBBON_MASK. PSYS_SRC_TARGET_KEY, uuid, PSYS_PART_FLAGS, 0 |PSYS_PART_RIBBON_MASK |PSYS_PART_TARGET_POS_MASK See http://wiki.secondlife.com/wiki/LlLinkParticleSystem for more details on each parameter. You can also visit the Particle Laboratory in-world for interactive demos and tutorials. Edit: bah, too slow. Edited June 24, 2020 by Fenix Eldritch 1 Link to comment Share on other sites More sharing options...
Miguelito Shilova Posted June 24, 2020 Author Share Posted June 24, 2020 Quote Replace the key specified for PSYS_SRC_TEXTURE with the key of your rope texture. This looks like it's going to work ... I understand this is a 2D ribbon, and It seems like the ribbon width in your provided code is already at minimum, but are there any tricks to narrow the width, or create any sort of depth to it? I used a 256 by 256 px flat color texture. Thanks Link to comment Share on other sites More sharing options...
Wulfie Reanimator Posted June 24, 2020 Share Posted June 24, 2020 (edited) 7 minutes ago, Miguelito Shilova said: This looks like it's going to work ... I understand this is a 2D ribbon, and It seems like the ribbon width in your provided code is already at minimum, but are there any tricks to narrow the width, or create any sort of depth to it? I used a 256 by 256 px flat color texture. Thanks 0.1 isn't the minimum. Anyway, you can go smaller by including transparent sides in your texture to make it appear even more narrow. Also, the orientation of the ribbon is based on the source object. Rotate 90 degrees and so will the ribbon, and you get a nice cross-shape if you use two sources in the same location with the same target. It's not perfect, but it's all you have. Edited June 24, 2020 by Wulfie Reanimator Link to comment Share on other sites More sharing options...
KT Kingsley Posted June 25, 2020 Share Posted June 25, 2020 Textures really aren't my thing, and the one I use in my example is fairly basic. Maybe a bit of darkening at its edges, and making strands that are S shaped rather than straight might help to give it a feeling of depth. But that's a job for someone more talented than me. Link to comment Share on other sites More sharing options...
Kyrah Abattoir Posted June 25, 2020 Share Posted June 25, 2020 Another thing to keep in mind is that despite the appearance, it is still a particle and still counts for the total scene particles, so easy on the particle count. You also cannot prevent it to "flow" the way it does. Link to comment Share on other sites More sharing options...
Recommended Posts
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