Jump to content

Triggering a sound within a mod


WillWorthington3

Recommended Posts

Howdy,

 

Was wondering if there was a script command or some other way to trigger a sound.

 

I was kinda hoping to be able to use the "Welcome Home" greeting you get when you join the Dark Brotherhood and have it play every time I walk in the door =P

 

Call me creepy, but I think it'd be kinda cool.

 

I figure this involves the use of an X Marker, but I don't know much beyond that, lol

 

I did some digging and found the correct wav file (Which isn't as easy as it sounds, grr)

 

Dark00General_DarkDoorWelcome_0004B77A_1

 

PS: I have a basic understanding of scripting, but Bill Gates doesn't need to worry at night.

 

Anyone ever thought of doing this or am I thinking waaaay too far out of the box?

Link to comment
Share on other sites

Bad time of day. You can use the command Playsound (SoundID) to make it play. I wouldn't use it if it's a long sound, like you want to stream music, though, because it can be unpredictable after a while about cutting off. It's best for short to medium length sounds.

 

My favorite method of using Playsound is to utilize a TriggerBox for it. You make a new triggerbox, and use a simple script on it to play the sound the first time the player walks through it.

 

SCN (Scriptname)

short DoOnce

begin OnTrigger
    if getactionref == player
         playsound (SoundID)
         set DoOnce to 42
    endif
end

Link to comment
Share on other sites

Bad time of day. You can use the command Playsound (SoundID) to make it play. I wouldn't use it if it's a long sound, like you want to stream music, though, because it can be unpredictable after a while about cutting off. It's best for short to medium length sounds.

 

My favorite method of using Playsound is to utilize a TriggerBox for it. You make a new triggerbox, and use a simple script on it to play the sound the first time the player walks through it.

 

SCN (Scriptname)

short DoOnce

begin OnTrigger
    if getactionref == player
         playsound (SoundID)
         set DoOnce to 42
    endif
end

 

 

Interestingly enough I came to the same conclusion, but after much trial and error. Guess I should have checked back here, lol

 

Oh well, learning and all that I guess.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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