Game Development Community

InGame Music

by Chris Ratliff · in Technical Issues · 11/11/2003 (8:34 pm) · 5 replies

For quite sometime now I have been trying to add ingame music into my map. I'm wanting it to play so that everyone within the map while on the server has to hear it. The StrongHold-Police clan for realm wars came up with a mod that does something near it but not enough. You see they wrote a script that allows music to be played while the menus load before the round actually starts. When I use an audioemitter inside the map, I get nothing. If I hit F11 and change the sound format to audio3d the song starts to play, but when its saved and restarted, nothing. Any ideas for adding an ingame music song, just to be played once, no looping, and then quit. A lot like say play a myst type game where the music itself plays only once, and then stops, however everyone in the map d/l's the file and it isplayed only once when they log on. when the song is finished they continue playing. Really it doesnt matter too much on the stopping of the music it could continue although if it becomes a long round it might get annoying.

#1
03/07/2004 (8:10 pm)
Dunno if you've solved this, but i just read a post while having a problem with 3d emitters. You have to make the max distance of an emitter larger from the base profile in audioProfiles.cs in server/scripts/ .

Give that a shot?
#2
03/09/2004 (4:13 pm)
Thanks I'll have to try that. I posted this so long ago that I had forgetten about it.
#3
04/11/2004 (12:14 am)
Heh. Maybe better if it'd stayed forgotten. : )
#4
04/11/2004 (9:14 am)
Yea tried that however, it can never truly be forgotten and since the game does not like to repeat itself while music is being played nor does like to send any type of send files when clients connect, I have forgotten it for now and will think about it again later.
#5
04/12/2004 (8:24 am)
A good way to do this might be to have each client do the alxPlay() after mission load (or before) which ever you decide to do.

You might want to do a commandToClientAll() from the server to call a client side script to do the actual alxPlay call.

I'd stay away from a 3d sound emitter for this.