Author Topic: PlaySound won't play custom sounds  (Read 323 times)

Legacy_ShardFenix

  • Newbie
  • *
  • Posts: 2
  • Karma: +0/-0
PlaySound won't play custom sounds
« on: August 01, 2012, 02:20:23 am »


                I can't solve this. I have a bunch of custom sounds that I put in a hakpack. They show up when I'm editing sound objects, and they play fine in the editor and in game.

Then I try using these custom sounds through the PlaySound script (I've used AssignCommand and ExecuteScript on the PC to play it on), and no matter how I set it up, custom sounds will not work.

I changed the script to run a sound that comes with the game, and it does work.

Does PlaySound just not play sounds from hakpacks?
               
               

               
            

Legacy_henesua

  • Hero Member
  • *****
  • Posts: 6519
  • Karma: +0/-0
PlaySound won't play custom sounds
« Reply #1 on: August 01, 2012, 05:23:21 pm »


               it does play sounds from hak packs.

In my experience, Play Sound will not play on an object with a busy action queue. I'd try playing the sound on a placeable, and see what happens.

Also, not all sounds are the same. These should be in MONO as far as I am aware. That means only one sound channel, no left and right etc....
               
               

               
            

Legacy_Fester Pot

  • Hero Member
  • *****
  • Posts: 1698
  • Karma: +0/-0
PlaySound won't play custom sounds
« Reply #2 on: August 01, 2012, 05:41:00 pm »


               Henesua nailed it *BANG*. Any sound using the scripted PlaySound command must be saved in .WAV MONO format.

Stereo .WAV files will not play or just come out sounding all static.

FP!
               
               

               
            

Baaleos

  • Administrator
  • Hero Member
  • *****
  • Posts: 1916
  • Karma: +0/-0
PlaySound won't play custom sounds
« Reply #3 on: August 02, 2012, 05:07:33 pm »


               I also believe there is a max filesize/length limit
in addition, the filename of audio file must be less than 16 characters (I think)

I tried converting a whole mp3 music file (4 minutes) into a wav mono - and didnt have much success getting it to play as a Static sound in the area.
Played in toolset, just didnt play in game.

(Darling Violetta - Voice of a Smaller God)