Page 1 of 1

Playing sound from console

Posted: Sat Jan 13, 2007 2:51 am
by lizardkid
Well i've been playing around with various config and script files to make things automatic that i usually do manually, but one thing i cant get is how to play a sound (wav or mp3) from the console. Tells me it cant find the sound. i've tried putting the file in sound and my own folder of choice, and it wont play.

tried...

play goodmorn.wav
play goodmorn
play sound/goodmorn
play sound/goodmorn.wav

and all the above, with playmp3. nothing works, just tells me it couldnt play the file. obviously, the file is called "goodmorn" and i have it in both mp3 and wav format, but i cant get it to play.

this is from console, so is this just one of those unsupported things that MOH tends to have, or am i just not doing it right?

playsong

Posted: Sat Jan 13, 2007 3:00 am
by tltrude
Have you tried " playsong main\sound\music\medicdance.mp3 ". I haven't tested it.

"Play" is not on the cmdlist, but "playmp3" is.

Posted: Sat Jan 13, 2007 7:10 am
by lizardkid
type "play something" in console and it tells you could the file specified couldnt be found.

anyway, it worked. apparently the directory it looks at first is the MOHAA dir, i was expecting it to be in main or sound, works like a charm.

although, after you tell it to play an mp3, you also have to type "stopmp3" to make it stop, otherwise it loops. which is nice enough i guess. is there any way to make a thread via the console? i'd like it to be that i could move and look around and shoot while my custom sound is playing... if i could just make a thread that waited until the sound is done and ended it, that'd be the best

Posted: Sat Jan 13, 2007 9:17 am
by Rookie One.pl
Testthread command?

UI

Posted: Sat Jan 13, 2007 3:55 pm
by tltrude
You could probably make some kind of song playing "ui_" menu and toggle it from the console or a configured F key. I did a lot of that with my "test_pointer" map, but have forgotten most of it.

Image

I don't think F7 and F8 are used in the game, so they could be set to start and stop your music (configs/unknownsoldier.cfg).

Posted: Sat Jan 13, 2007 7:01 pm
by lizardkid
testthread wont work, A) i cant even test it, i cant get cheats to be 1 at all ingame. B) if i need cheats i cant use it on a server anyway...

i'm fairly sure ui use the same thread as input, which is what i'm using already, just in console... i'll give it a shot though