Talk:Play - Sound

Active discussions

This example plays a sound FX in a spell magic effect event. To use it, create a Sound Marker (that points to a Sound Descriptor) and pass the Sound Marker to the Sound Proprty.

  ;This property uses the Sound Marker
  Sound Property DogWhistle Auto

  Event OnEffectStart(Actor akTarget, Actor akCaster)
    DogWhistle.Play(game.GetPlayer())
  EndEvent

--Sollar 15:09, 22 June 2012 (EDT)


A Complete Example ScriptEdit

Scriptname AAMyNoisyActivatorScript extends ObjectReference  

; Object script placed on an activator object that makes a noise when you activate it. 

Event OnActivate (ObjectReference akActionRef)

	AAMyNoisyActivatorSound.Play(self)	

EndEvent 

Sound Property AAMyNoisyActivatorSound  Auto

The sounds that may be used are "Sound Descriptors" found under the "Audio" heading in the Object Window.

--David Brasher 15:26, 4 June 2012 (EDT)

Return to "Play - Sound" page.