Aller au contenu

Photo

PlaySound won't play custom sounds


  • Veuillez vous connecter pour répondre
3 réponses à ce sujet

#1
ShardFenix

ShardFenix
  • Members
  • 1 messages
 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?

#2
henesua

henesua
  • Members
  • 3 883 messages
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....

#3
Fester Pot

Fester Pot
  • Members
  • 1 395 messages
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!

#4
Baaleos

Baaleos
  • Members
  • 1 331 messages
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)