Music insert
#1
hey guys. wondering if theres anyway to insert spawn music and background music while playing. ive always wanted to set it up like call of duty and such. it would make the game that much more entertaining for me
Thanks given by:
#2
Use the music command. If you want it to always be playing while you play (don't see why since without a script randomizing which song is played, I think it would get too repetitive and annoying) you can add it to alias mapstartalways so everytime a map is loaded the music starts to play.

ie
if (strstr $mapstartalways music) [] [add2alias mapstartalways [music blahblahblahb...]

The command uses 3 arguments, the first one being the only required one. They are as follows:
/music "path/file_name_without_extension" total_play_time_in_milliseconds command/code_block_to_execute_when_music_is_finished
The music must be in ".ogg" format and somewhere within your AC installation, AFAIK.

As an example, take a look at the latest revision of tutorial.cfg, where the script loops the default flag grab music 5 times while the demo is playing via alias mapstartonce. (See line 5.)

HTH! :)

Edit:

An easier alternative would be, use a media player in the background! :P

Also, turns out you'll have to use the registermusic command first to register it before you can play it via the music command! See /config/sounds.cfg for example use of "registermusic".
Thanks given by:
#3
Is it possible to open a playlist this way?
Thanks given by:
#4
No, though if you look on akimbo you will find a "playlist" like script. I'll let V-Man give us a link.
Thanks given by:
#5
Assault Your Ears
Assault Your Ears (barebones, script only)
It's rather complicated in terms of adding your own music, but it is a method for making a playlist indeed.
Thanks given by:
#6
thanks everyone for their info. ill see if i can put something together
Thanks given by: