Jump to content

Make a sound play from a static object instead of player


morrowind1979

Recommended Posts

When I open a sound in the CK I have no option for min or max distance, only attenuation and decibel variation the distance options don't exist. Was going to post a screenshot, but cant figure out how to attach an image to my post. But I got a suitable workaround to the prob anyway so I guess it dosen't really matter lol

Link to comment
Share on other sites

Scriptname DagWhisperScript extends ObjectReference  
  
Sound Property DGWhisp  Auto

int instanceID

Event OnTriggerEnter(ObjectReference akActionRef)
	If(akActionRef == Game.GetPlayer())
	instanceID = DGWhisp.play(self)
EndIf
EndEvent

Event OnTriggerLeave(ObjectReference akActionRef)
If(akActionRef == Game.GetPlayer())
Sound.StopInstance(instanceID)
EndEvent
You said you already tried something like this, but I don't see why this wouldn't work.

 

Yeah it didn't work. That's why I redone the script lol

Link to comment
Share on other sites

  • Recently Browsing   0 members

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