Skip to content

Instantiate sound object from palette?

Gerad_VizagaGerad_Vizaga Member Posts: 14
edited May 2019 in Builders - Scripting
Hi all,

So there is a specific sound I am trying to play in the game, on demand through an item special ability. But apparently the sound I want to use is not a mono sound, so PlaySound() won't work..

I believe it is "as_fanfare_horn". It's an awesome Inception-like horn, great for a bugle item. But I can't play the sound because it isn't a mono sound.

My server doesn't use haks, so I'm trying to do this without them.

The idea would be to create the sound object containing the horn sound in the area, play the sound, and then delete the object afterwards on a delay. The only problem is that CreateObject() doesn't seem to work with sound objects, according to the function's comments.

Is it possible to do what I want to do?

Thanks for the help!

Gerad

Comments

  • PhantasmaPhantasma Member Posts: 79
    You should just be able to place the sound, untick the Active checkbox on the Advance tab, and then use SoundObjectPlay/Stop to control when to play it :-)
  • Gerad_VizagaGerad_Vizaga Member Posts: 14
    Phantasma, sure, you could do it that way, but then the horn will only sound in the area it is placed in, no?

    Say you put that horn sound object in a town area. If you go to a woods area, for example, will that sound object play where you are, or back in the town?
  • NeverwinterWightsNeverwinterWights Member Posts: 339
    This may still be a leftover bug when they switched audio formats in the Enhanced Edition. There were a lot of problems that were fixed. This might also sadly be a permanent unfortunate side effect from the switch. I'm not 100% sure. But I do know you used to be able to play that sound and other mono sounds simply using the PlaySound() function.
  • Gerad_VizagaGerad_Vizaga Member Posts: 14
    Oh no, that would stink. I tried my script with other sounds and it works fine. Just the as_fanfare_horn doesn't work. That's super disappointing.

    Thanks for the info though.
Sign In or Register to comment.