Jump to content

Sound from prim in linkset without additional script.


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

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

Recommended Posts

Hello! I came across a vehicles in which the sound comes not from the root prim but from another, for example from a motor. but at the same time in the motor prim, I did not find the script. How to make the sound go from not root prim and from child prim in a link set without an additional script?

Link to post
Share on other sites
3 minutes ago, ainst Composer said:

Hello! I came across a vehicles in which the sound comes not from the root prim but from another, for example from a motor. but at the same time in the motor prim, I did not find the script. How to make the sound go from not root prim and from child prim in a link set without an additional script?

Well that giff swirl is an Epiletic inducer. Damned dangerous.

  • Haha 1
Link to post
Share on other sites
10 minutes ago, ainst Composer said:

How to make the sound go from not root prim and from child prim in a link set without an additional script?

Sadly, this is not possible. There are currently no "linked" functions that allow you to play/trigger a sound from a different child prim. At present, you must use a script and that script will only allow you to emit sounds from the prim in which said script resides.

Regarding your specific example, I can only assume that the script controlling the sound was hidden in some other nearby child prim.

  • Thanks 1
Link to post
Share on other sites
19 hours ago, Fenix Eldritch said:

Regarding your specific example, I can only assume that the script controlling the sound was hidden in some other nearby child prim.

That seems the most likely explanation, but if that can be ruled out (perhaps by unlinking and moving prims around until the sound emitter is confirmed), then I wonder if it's due to the persistence of llLoopSound(). I don't remember exactly how that works but I know the sound will continue looping after the script is removed at least for a time.

It doesn't seem very practical for a vehicle, but in theory one could use llRemoteLoadScriptPin() to push a sound script to the intended emitter, and that script could remove itself after starting the sound loop. (One bit of impracticality is that the script doing the pushing is forced to sleep for three seconds, so that's upward pressure on script count.)

  • Like 1
  • Thanks 1
Link to post
Share on other sites
3 hours ago, Qie Niangao said:

That seems the most likely explanation, but if that can be ruled out (perhaps by unlinking and moving prims around until the sound emitter is confirmed), then I wonder if it's due to the persistence of llLoopSound(). I don't remember exactly how that works but I know the sound will continue looping after the script is removed at least for a time.

It doesn't seem very practical for a vehicle, but in theory one could use llRemoteLoadScriptPin() to push a sound script to the intended emitter, and that script could remove itself after starting the sound loop. (One bit of impracticality is that the script doing the pushing is forced to sleep for three seconds, so that's upward pressure on script count.)

Looping sound is in fact a permanent prim property, much like particles or hovertext or color. The sound would keep playing forever, even after taking it into inventory with no script and rezzing it again.

  • Like 1
  • Thanks 2
Link to post
Share on other sites

That surprised me, I had no idea looping sound was in fact a prim property. But I just tried it now and sure enough, Wulfie and Qie are correct!

Is this documented somewhere? I wasn't able to find any references to this on the wiki.

Edited by Fenix Eldritch
Link to post
Share on other sites
5 minutes ago, Fenix Eldritch said:

That surprised me, I had no idea looping sound was in fact a prim property. But I just tried it now and sure enough, Wulfie is correct!

Is this documented somewhere? I wasn't able to find any references to this on the wiki.

Maybe one day I should request wiki editing privileges, these little details come up every now and then without a clear indicator. (I don't remember where I learned this from, probably directly from somebody else or by noticing it never stops.)

  • Like 1
Link to post
Share on other sites
9 minutes ago, Fenix Eldritch said:

That surprised me, I had no idea looping sound was in fact a prim property. But I just tried it now and sure enough, Wulfie is correct!

Is this documented somewhere? I wasn't able to find any references to this on the wiki.

A sound file in an object is just a link. It is not an object. Removing that link does nothing because the data file is in the server.

Edited by steph Arnott
Link to post
Share on other sites
1 hour ago, ItHadToComeToThis said:

So a longer winded version of what Wulfie stated. Gotcha 

If that is how you want to perceive it that is upto you. But knowing it is only a link then it is obvious you only need its asset key rather than dumping a link into the object contents. All that does is make a script test it is there instead of just calling the asset. The reason you put a sound file link in a loop sound is because simply removing it from the contents and calling up by say touch will throw up a NUL_KEY clearing that loop. But i would never write a script with no way of stopping it.

Edited by steph Arnott
Link to post
Share on other sites
You are about to reply to a thread that has been inactive for 722 days.

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...