PapaLegaBooboo Posted June 17, 2021 Share Posted June 17, 2021 I know how to add a sound object from misc/sounds to the render window, assign it to a ref variable, and enable & disable accordingly. But I want to add the sound object dynamically at the player regardless of the player's position. Is this possible? Link to comment Share on other sites More sharing options...
Pellape Posted June 17, 2021 Share Posted June 17, 2021 (edited) This would be a question for the CS thread I guess. :wink: Yes it is possible with an activator and you use the playsound command in a script. If it is an object that is meant to have a working collision as well, then the script also must have at least 3 stages... Move the object to the player Disable it and let at least 1 frame to run Enable it.If it is an object that will not be visabe nor have collisions, then the green framed invisible trigger object could be used, well copy it, give it a new objectname and move it as you please in game and do not forget to add the script with conditions to it. Edited June 17, 2021 by Pellape Link to comment Share on other sites More sharing options...
KatsAwful Posted June 17, 2021 Share Posted June 17, 2021 Just move the object to the player before running it. Reference.MoveTo should work. You can use offsets if you need it Link to comment Share on other sites More sharing options...
PapaLegaBooboo Posted June 18, 2021 Author Share Posted June 18, 2021 (edited) Just move the object to the player before running it. Reference.MoveTo should work. You can use offsets if you need it I tried myref.MoveTo player but it's not working. I have the persistent & initially disabled flags checked on the sound object, but those don't have anything to do with it as I've already tested it by having them checked off. Edited June 18, 2021 by PapaLegaBooboo Link to comment Share on other sites More sharing options...
DrakeTheDragon Posted June 18, 2021 Share Posted June 18, 2021 Hmm, I'm far from knowledgeable in this regard, but going by what was said in your other topics, could it be MoveTo'ing the sound object will stop the sound just like disabling it does? Or what method do you use to diagnose "it's not working" after a MoveTo call?MoveTo is already known to cancel several other running things on the object that's moved. Maybe a playing sound effect is just one more to the list. Link to comment Share on other sites More sharing options...
glowplug Posted June 18, 2021 Share Posted June 18, 2021 Just move the object to the player before running it. Reference.MoveTo should work. You can use offsets if you need it I tried myref.MoveTo player but it's not working. I have the persistent & initially disabled flags checked on the sound object, but those don't have anything to do with it as I've already tested it by having them checked off. The 7z I provided on the other thread works for the title of this one...Stand still at one end of the hall for 10 second and a sound plays.Move and it stops.Go to the other end of the hall, stand for 10 seconds and a different sound plays.1 Quest Script for the Start/Stop of Sound on Player, a Function Script to reduce number of variables (game save storage) and keep it clean.Whatever Triggers/Activators to change that sound.I mentioned more responsive ways than a Quest Script and their caveats. As I posted there, message me if you are having trouble.As I added there, it would be ideal for either xOBSE or a plugin to resolve StopSound.In the mean time I am more than happy to help you program what you want to achieve. If anyone else sees a problem in the way this solution functions then please let me know so I can revoke it. Link to comment Share on other sites More sharing options...
Recommended Posts