Play - Sound

From Creation Kit
Jump to: navigation, search

Member of: Sound Script

Plays the sound from the location of the specified object reference.


int Function Play(ObjectReference akSource) native


Return Value

The returned integer is the playback instance ID, which can be used to control the sound after it has been started. If 0 is returned the sound failed to play.

Note: This function will return an error if the object does not have any 3D loaded.


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

See Also