Jump to content

[LE] Syntax to call a MusicType in CK


Recommended Posts

Hmm alright thanks for the help. I'm trying to get music to play through dialogue from my follower almost as if someone was playing a song.

 

So I want it to sound like it was coming from an object and not like its playing into my headphones. I assumed this would be easy since the radios in fallout play music from an object.

 

Any idea if this is possible?

Link to comment
Share on other sites

Ok so I got the script to compile properly in the Creation Kit so in the dialogue fragment it looks like

 

mySoundFX.Play(akSpeaker)

 

and then I have the mySoundFX property filled with my sound marker that has a .wav file attached to the sound descriptor. However when I went in game and chose the dialogue option the game crashed. So am I missing something?

Link to comment
Share on other sites

Fixed my problem and got it to work. The reason it was crashing is because I was using a .wav file but I converted it to an .xwm and had to change the directory in TESEdit to get the .xwm file to be read. I thought people said that wav files were now ok to use but I guess it's still best to use xwm.

Link to comment
Share on other sites

I don't know if I should create a separate post since this is pretty much related, but is there a way to stop a sound from playing?

I have my sound working now but I also created a dialogue to stop it whenever I want. mySoundFX.Stop

 

But It seems this isn't a function. The sound will stop on It's own, but since I want to have a long list of sounds I would have to wait forever for it to end.

Link to comment
Share on other sites

I don't know if I should create a separate post since this is pretty much related, but is there a way to stop a sound from playing?

I have my sound working now but I also created a dialogue to stop it whenever I want. mySoundFX.Stop

 

But It seems this isn't a function. The sound will stop on It's own, but since I want to have a long list of sounds I would have to wait forever for it to end.

 

mySoundFX.Play()
It's only used with short lenght SD sounds, and you can't call on it " mySoundFX.Stop() ".
In order to call a sound either SD or LP to stop, you need to store it in an " int ", example :
Sound property mySoundFX auto
 
int instanceID    ;used to store sound ref
 
EVENT SomeEvent..............
 
            instanceID = mySoundFX.Play(game.getPlayer())
            ............
            ; Do Stuff
            ...........
            StopInstance(instanceID)   ; Stops the Sound - InstanceID
 
EndEvent
If you are going to use - call multiple sounds and you need each of them to be able to be stoped on will, then every sound needs to have its own " Int ".
Sound property mySoundFXa = int instanceIDa
Sound property mySoundFXb = int instanceIDb
Sound property mySoundFXc = int instanceIDc
Sound property mySoundFXd = int instanceIDd
... etc...
Edited by maxarturo
Link to comment
Share on other sites

  • Recently Browsing   0 members

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