Playing sound from console

General Discussion about Medal of Honor: Allied Assault and Pacific Assault.

Moderator: Moderators

Post Reply
lizardkid
Windows Zealot
Posts: 3672
Joined: Fri Mar 19, 2004 7:16 pm
Location: Helena MT

Playing sound from console

Post 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?
Moderator

۞
Abyssus pro sapientia
Olympus pro Ignarus
۞

AND STUFF™ © 2006
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

playsong

Post 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.
Tom Trude,

Image
lizardkid
Windows Zealot
Posts: 3672
Joined: Fri Mar 19, 2004 7:16 pm
Location: Helena MT

Post 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
Moderator

۞
Abyssus pro sapientia
Olympus pro Ignarus
۞

AND STUFF™ © 2006
Rookie One.pl
Site Admin
Posts: 2752
Joined: Fri Jan 31, 2003 7:49 pm
Location: Nowa Wies Tworoska, Poland
Contact:

Post by Rookie One.pl »

Testthread command?
Admin
Image
Image
Honour guide me.

here's my stuff - inequation.org | here's where I work - thefarm51.com
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

UI

Post 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).
Tom Trude,

Image
lizardkid
Windows Zealot
Posts: 3672
Joined: Fri Mar 19, 2004 7:16 pm
Location: Helena MT

Post 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
Moderator

۞
Abyssus pro sapientia
Olympus pro Ignarus
۞

AND STUFF™ © 2006
Post Reply