MantisBT - opensim
View Issue Details
0008305opensim[REGION] Script Functionspublic2018-03-19 09:322018-04-09 20:02
Bob Wellman 
 
normalminoralways
newopen 
0.9.0 
 
Grid (Multiple Regions per Sim)
BulletSim
Unknown
None
0008305: [FEATURE REQUEST] add Sound commands for Linked prims
Particles can be set for a prim the script is in using llParticleSystem and for any linked prim in a link-set using llLinkParticleSyetm. This is useful as I can use one script per object that decides which links should emit which particles.

The same flexibility would be useful for sounds but we have only commands that make sounds from the prim the sound script is in. It would be good if we could have link versions of all sound commands (e.g. osLinkLoopSound osLinkPlaySound etc.) to make scripting them easier and more efficient.
I assume they would work the same as the ll version but with addditional first parameter being Link number.

Most other properties of a prim that can be set using llSetPrimitiveParams can also be set for a particular link using llSetLinkParamativeParams. It seems like Sounds is the odd man out.
No tags attached.
Issue History
2018-03-19 09:32Bob WellmanNew Issue
2018-04-08 05:50Bob WellmanAdditional Information Updatedbug_revision_view_page.php?rev_id=6575#r6575
2018-04-08 16:29UbitUmarovNote Added: 0032631
2018-04-08 16:32UbitUmarovNote Added: 0032632
2018-04-08 16:34UbitUmarovNote Added: 0032633
2018-04-09 20:02UbitUmarovNote Added: 0032636

Notes
(0032631)
UbitUmarov   
2018-04-08 16:29   
on branch httptests i added a few ossl functions:


osAdjustSoundVolume(LSL_Integer linknum, LSL_Float volume);
osLoopSound(LSL_Integer linknum, LSL_String sound, LSL_Float volume);
osLoopSoundMaster(LSL_Integer linknum, LSL_String sound, LSL_Float volume);
osLoopSoundSlave(LSL_Integer linknum, LSL_String sound, LSL_Float volume);
osPlaySound(LSL_Integer linknum, LSL_String sound, LSL_Float volume);
osPlaySoundSlave(LSL_Integer linknum, LSL_String sound, LSL_Float volume);
osPreloadSound(LSL_Integer linknum, LSL_String sound);
osSetSoundRadius(LSL_Integer linknum, LSL_Float radius);
osStopSound(LSL_Integer linknum);
osTriggerSound(LSL_Integer linknum, LSL_String sound, LSL_Float volume);

note that linknum must point to a single prim.
only LINK_ROOT and LINK_THIS will work, others relative to several prims will be silently ignored

root prim can be selected with LINK_ROOT, 0 or 1.

sorry, could not do much testing :(
(0032632)
UbitUmarov   
2018-04-08 16:32   
above ignore the parts "LSL_" LSL_String means string, etc
(0032633)
UbitUmarov   
2018-04-08 16:34   
as sugested they do work as the ll ones
llSet*PrimitiveParams is out for now..
(0032636)
UbitUmarov   
2018-04-09 20:02   
also added osTriggerSoundLimited(integer linknum, string sound, float volume,
                 vector top_north_east, vector bottom_south_west);