Posted by
Sehnsucht on
Sun Dec 28th 2008 at 4:16pm
I solved the problem!
What you need is an ambient_generic for each song, a logic_auto and a logic_case. First of all, you need to get the logic_auto to work, because for whatever reason people have been having problems getting it to launch a sound at map spawn. In the logic_auto, stop all your sounds with a delay of .2 and use a delay of .5 to launch your logic_case. This works like a charm, but it's annoying how you need to use a trick to get something like this to work.
In the logic_case you can trigger up to 16 songs, and you need to trigger a the logic_case in the same case (case1 for example) using a delay the length of the song. A 2:54 minute song (60 * 2 + 54 + 1) should be 175 seconds.
What a pain! Again, if there is a better/easier/faster way to do it, please let me know. This is what my VMF looks like now:
[code]versioninfo
{
"editorversion" "400"
"editorbuild" "4037"
"mapversion" "10"
"formatversion" "100"
"prefab" "0"
}
visgroups
{
}
viewsettings
{
"bSnapToGrid" "1"
"bShowGrid" "1"
"bShowLogicalGrid" "0"
"nGridSpacing" "16"
"bShow3DGrid" "0"
}
world
{
"id" "1"
"mapversion" "10"
"classname" "worldspawn"
"skyname" "sky_day01_01"
"maxpropscreenwidth" "-1"
"detailvbsp" "detail.vbsp"
"detailmaterial" "detail/detailsprites"
}
entity
{
"id" "2"
"classname" "logic_case"
"targetname" "musicpicker"
connections
{
"OnCase01" "music-adrenalinejunkie,PlaySound,,0,-1"
"OnCase02" "music-complex13,PlaySound,,0,-1"
"OnCase03" "music-counterattack,PlaySound,,0,-1"
"OnCase04" "music-etf,PlaySound,,0,-1"
"OnCase05" "music-gravitywell,PlaySound,,0,-1"
"OnCase06" "music-onebloodbath,PlaySound,,0,-1"
"OnCase07" "music-pressurepoint,PlaySound,,0,-1"
"OnCase08" "music-stealthfrag,PlaySound,,0,-1"
"OnCase09" "music-biggun,PlaySound,,0,-1"
"OnCase10" "music-descentintocerberon,PlaySound,,0,-1"
"OnCase11" "music-killratio,PlaySound,,0,-1"
"OnCase12" "music-marchofthestroggs,PlaySound,,0,-1"
"OnCase13" "music-operationoverlord,PlaySound,,0,-1"
"OnCase14" "music-quadmachine,PlaySound,,0,-1"
"OnCase15" "music-rage,PlaySound,,0,-1"
"OnCase16" "music-theunderworld,PlaySound,,0,-1"
"OnCase01" "musicpicker,PickRandomShuffle,,172,-1"
"OnCase02" "musicpicker,PickRandomShuffle,,178,-1"
"OnCase03" "musicpicker,PickRandomShuffle,,192,-1"
"OnCase04" "musicpicker,PickRandomShuffle,,174,-1"
"OnCase05" "musicpicker,PickRandomShuffle,,154,-1"
"OnCase06" "musicpicker,PickRandomShuffle,,175,-1"
"OnCase07" "musicpicker,PickRandomShuffle,,183,-1"
"OnCase08" "musicpicker,PickRandomShuffle,,178,-1"
"OnCase09" "musicpicker,PickRandomShuffle,,185,-1"
"OnCase10" "musicpicker,PickRandomShuffle,,156,-1"
"OnCase11" "musicpicker,PickRandomShuffle,,153,-1"
"OnCase12" "musicpicker,PickRandomShuffle,,172,-1"
"OnCase13" "musicpicker,PickRandomShuffle,,209,-1"
"OnCase14" "musicpicker,PickRandomShuffle,,216,-1"
"OnCase15" "musicpicker,PickRandomShuffle,,138,-1"
"OnCase16" "musicpicker,PickRandomShuffle,,155,-1"
}
"origin" "-56 24 48"
editor
{
"color" "220 30 220"
"visgroupshown" "1"
"visgroupautoshown" "1"
"logicalpos" "[0 1500]"
}
}
entity
{
"id" "4"
"classname" "logic_auto"
"spawnflags" "1"
connections
{
"OnMapSpawn" "musicpicker,PickRandomShuffle,,0.5,-1"
"OnMapSpawn" "music-theunderworld,StopSound,,0.2,-1"
"OnMapSpawn" "music-rage,StopSound,,0.2,-1"
"OnMapSpawn" "music-quadmachine,StopSound,,0.2,-1"
"OnMapSpawn" "music-operationoverlord,StopSound,,0.2,-1"
"OnMapSpawn" "music-marchofthestroggs,StopSound,,0.2,-1"
"OnMapSpawn" "music-killratio,StopSound,,0.2,-1"
"OnMapSpawn" "music-descentintocerberon,StopSound,,0.2,-1"
"OnMapSpawn" "music-biggun,StopSound,,0.2,-1"
"OnMapSpawn" "music-stealthfrag,StopSound,,0.2,-1"
"OnMapSpawn" "music-pressurepoint,StopSound,,0.2,-1"
"OnMapSpawn" "music-onebloodbath,StopSound,,0.2,-1"
"OnMapSpawn" "music-gravitywell,StopSound,,0.2,-1"
"OnMapSpawn" "music-etf,StopSound,,0.2,-1"
"OnMapSpawn" "music-counterattack,StopSound,,0.2,-1"
"OnMapSpawn" "music-complex13,StopSound,,0.2,-1"
"OnMapSpawn" "music-adrenalinejunkie,StopSound,,0.2,-1"
}
"origin" "-56 8 48"
editor
{
"color" "220 30 220"
"visgroupshown" "1"
"visgroupautoshown" "1"
"logicalpos" "[0 1500]"
}
}
entity
{
"id" "6"
"classname" "ambient_generic"
"targetname" "music-stealthfrag"
"health" "10"
"preset" "0"
"volstart" "0"
"fadeinsecs" "0"
"fadeoutsecs" "0"
"pitch" "100"
"pitchstart" "100"
"spinup" "0"
"spindown" "0"
"lfotype" "0"
"lforate" "0"
"lfomodpitch" "0"
"lfomodvol" "0"
"cspinup" "0"
"radius" "1250"
"spawnflags" "49"
"message" "music/stealthfrag.mp3"
"origin" "-72 24 48"
editor
{
"color" "220 30 220"
"visgroupshown" "1"
"visgroupautoshown" "1"
"logicalpos" "[0 500]"
}
}
entity
{
"id" "9"
"classname" "ambient_generic"
"targetname" "music-theunderworld"
"health" "10"
"preset" "0"
"volstart" "0"
"fadeinsecs" "0"
"fadeoutsecs" "0"
"pitch" "100"
"pitchstart" "100"
"spinup" "0"
"spindown" "0"
"lfotype" "0"
"lforate" "0"
"lfomodpitch" "0"
"lfomodvol" "0"
"cspinup" "0"
"radius" "1250"
"spawnflags" "49"
"message" "music/theunderworld.mp3"
"origin" "-88 24 48"
editor
{
"color" "220 30 220"
"visgroupshown" "1"
"visgroupautoshown" "1"
"logicalpos" "[0 500]"
}
}
entity
{
"id" "12"
"classname" "ambient_generic"
"targetname" "music-rage"
"health" "10"
"preset" "0"
"volstart" "0"
"fadeinsecs" "0"
"fadeoutsecs" "0"
"pitch" "100"
"pitchstart" "100"
"spinup" "0"
"spindown" "0"
"lfotype" "0"
"lforate" "0"
"lfomodpitch" "0"
"lfomodvol" "0"
"cspinup" "0"
"radius" "1250"
"spawnflags" "49"
"message" "music/rage.mp3"
"origin" "-88 8 48"
editor
{
"color" "220 30 220"
"visgroupshown" "1"
"visgroupautoshown" "1"
"logicalpos" "[0 500]"
}
}
entity
{
"id" "15"
"classname" "ambient_generic"
"targetname" "music-pressurepoint"
"health" "10"
"preset" "0"
"volstart" "0"
"fadeinsecs" "0"
"fadeoutsecs" "0"
"pitch" "100"
"pitchstart" "100"
"spinup" "0"
"spindown" "0"
"lfotype" "0"
"lforate" "0"
"lfomodpitch" "0"
"lfomodvol" "0"
"cspinup" "0"
"radius" "1250"
"spawnflags" "49"
"message" "music/pressurepoint.mp3"
"origin" "-72 8 48"
editor
{
"color" "220 30 220"
"visgroupshown" "1"
"visgroupautoshown" "1"
"logicalpos" "[0 500]"
}
}
entity
{
"id" "18"
"classname" "ambient_generic"
"targetname" "music-onebloodbath"
"health" "10"
"preset" "0"
"volstart" "0"
"fadeinsecs" "0"
"fadeoutsecs" "0"
"pitch" "100"
"pitchstart" "100"
"spinup" "0"
"spindown" "0"
"lfotype" "0"
"lforate" "0"
"lfomodpitch" "0"
"lfomodvol" "0"
"cspinup" "0"
"radius" "1250"
"spawnflags" "49"
"message" "music/onebloodbath.mp3"
"origin" "-72 -8 48"
editor
{
"color" "220 30 220"
"visgroupshown" "1"
"visgroupautoshown" "1"
"logicalpos" "[0 500]"
}
}
entity
{
"id" "21"
"classname" "ambient_generic"
"targetname" "music-quadmachine"
"health" "10"
"preset" "0"
"volstart" "0"
"fadeinsecs" "0"
"fadeoutsecs" "0"
"pitch" "100"
"pitchstart" "100"
"spinup" "0"
"spindown" "0"
"lfotype" "0"
"lforate" "0"
"lfomodpitch" "0"
"lfomodvol" "0"
"cspinup" "0"
"radius" "1250"
"spawnflags" "49"
"message" "music/quadmachine.mp3"
"origin" "-88 -8 48"
editor
{
"color" "220 30 220"
"visgroupshown" "1"
"visgroupautoshown" "1"
"logicalpos" "[0 500]"
}
}
entity
{
"id" "24"
"classname" "ambient_generic"
"targetname" "music-operationoverlord"
"health" "10"
"preset" "0"
"volstart" "0"
"fadeinsecs" "0"
"fadeoutsecs" "0"
"pitch" "100"
"pitchstart" "100"
"spinup" "0"
"spindown" "0"
"lfotype" "0"
"lforate" "0"
"lfomodpitch" "0"
"lfomodvol" "0"
"cspinup" "0"
"radius" "1250"
"spawnflags" "49"
"message" "music/operationoverlord.mp3"
"origin" "-88 -24 48"
editor
{
"color" "220 30 220"
"visgroupshown" "1"
"visgroupautoshown" "1"
"logicalpos" "[0 500]"
}
}
entity
{
"id" "27"
"classname" "ambient_generic"
"targetname" "music-gravitywell"
"health" "10"
"preset" "0"
"volstart" "0"
"fadeinsecs" "0"
"fadeoutsecs" "0"
"pitch" "100"
"pitchstart" "100"
"spinup" "0"
"spindown" "0"
"lfotype" "0"
"lforate" "0"
"lfomodpitch" "0"
"lfomodvol" "0"
"cspinup" "0"
"radius" "1250"
"spawnflags" "49"
"message" "music/gravitywell.mp3"
"origin" "-72 -24 48"
editor
{
"color" "220 30 220"
"visgroupshown" "1"
"visgroupautoshown" "1"
"logicalpos" "[0 500]"
}
}
entity
{
"id" "30"
"classname" "ambient_generic"
"targetname" "music-etf"
"health" "10"
"preset" "0"
"volstart" "0"
"fadeinsecs" "0"
"fadeoutsecs" "0"
"pitch" "100"
"pitchstart" "100"
"spinup" "0"
"spindown" "0"
"lfotype" "0"
"lforate" "0"
"lfomodpitch" "0"
"lfomodvol" "0"
"cspinup" "0"
"radius" "1250"
"spawnflags" "49"
"message" "music/etf.mp3"
"origin" "-72 -40 48"
editor
{
"color" "220 30 220"
"visgroupshown" "1"
"visgroupautoshown" "1"
"logicalpos" "[0 500]"
}
}
entity
{
"id" "33"
"classname" "ambient_generic"
"targetname" "music-marchofthestroggs"
"health" "10"
"preset" "0"
"volstart" "0"
"fadeinsecs" "0"
"fadeoutsecs" "0"
"pitch" "100"
"pitchstart" "100"
"spinup" "0"
"spindown" "0"
"lfotype" "0"
"lforate" "0"
"lfomodpitch" "0"
"lfomodvol" "0"
"cspinup" "0"
"radius" "1250"
"spawnflags" "49"
"message" "music/marchofthestroggs.mp3"
"origin" "-88 -40 48"
editor
{
"color" "220 30 220"
"visgroupshown" "1"
"visgroupautoshown" "1"
"logicalpos" "[0 500]"
}
}
entity
{
"id" "36"
"classname" "ambient_generic"
"targetname" "music-killratio"
"health" "10"
"preset" "0"
"volstart" "0"
"fadeinsecs" "0"
"fadeoutsecs" "0"
"pitch" "100"
"pitchstart" "100"
"spinup" "0"
"spindown" "0"
"lfotype" "0"
"lforate" "0"
"lfomodpitch" "0"
"lfomodvol" "0"
"cspinup" "0"
"radius" "1250"
"spawnflags" "49"
"message" "music/killratio.mp3"
"origin" "-88 -56 48"
editor
{
"color" "220 30 220"
"visgroupshown" "1"
"visgroupautoshown" "1"
"logicalpos" "[0 500]"
}
}
entity
{
"id" "39"
"classname" "