Jump to content

PlaySound Command


David Brasher

Recommended Posts

The wiki has a very short article with very vague example scripts which do not clearly show which parts are placeholders that need to be edited in the script in your mod.

 

The example scripts:

 

int Function Play(ObjectReference akSource) native

 

int instanceID = mySFX.play(self)          ; play mySFX sound from my self
Sound.SetInstanceVolume(instanceID, 0.5)         ; play at half volume

 

Source: Play - Sound

 

No advice is given on how to set the properties on the script. Although I have created a new sound which functions in-game when an activator is activated, this sound is not even on the list of sounds that can be attached to properties.

 

How is a person to proceed?

Link to comment
Share on other sites

Heres a script I wrote with play() just yesterday. Should give a better example of usage in context than I could describe.

 

Edit: "Plays the sound from the location of the specified object reference." This means that the parameter play() takes is the target you want the sound to come from. If self is used it will play the sound from the object reference the script is attached to. You could even set it to another object reference like a door across the room.

Link to comment
Share on other sites

I can't get this part of your script to work:

 

;Be sure to point this to your effect by opening the properties window.
Sound Property mySoundEffect Auto

 

My custom sound is never on the list of possible sounds that can be attached to property "mySoundEffect."

 

I have created a Sound Descriptor and I know it works because I can get it to play its sound in the game if I attach it to an activator. I touch the activator and my custom sound plays. But the CK won't let me attach my custom sound to a property and use it in a script.

Edited by David Brasher
Link to comment
Share on other sites

That is as counter-intuitive as all get-out. I am never going to place a sound generating speaker with this sound in any of my locations, but it would appear that I have to build one to use a sound in a script. I wonder what those programmers were smoking while they designed and built Skyrim?

 

Thanks for the help.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...