Adding a Music Cue with Mappadds ?

Obsidian General.
User avatar
Neico
Lead Coder
Lead Coder
Posts: 1799
Joined: Tue Aug 15, 2006 3:39 pm
Location: Germany
Contact:

Re: Adding a Music Cue with Mappadds ?

Post by Neico »

I'm always interested in good music~
Image
fustrun
prop_static
prop_static
Posts: 92
Joined: Fri Sep 11, 2009 8:23 am

Re: Adding a Music Cue with Mappadds ?

Post by fustrun »

Oh i thought that your swammped with tracks ! didn't think you'd be intrested :P
I linked my channel in the previous page check it out and if you like what you hear i might compose something for your upcoming release :)
btw any idea on that problem i posterd ? i just composed a cue and i want to use it in the game, if it's not too much trouble of course :) i understand you have more important things on your mind :)
so check my channel out and tell me what you think.
User avatar
Neico
Lead Coder
Lead Coder
Posts: 1799
Joined: Tue Aug 15, 2006 3:39 pm
Location: Germany
Contact:

Re: Adding a Music Cue with Mappadds ?

Post by Neico »

I would have awnsered it if I had an awnser, I got that error serveral times during some testing with new mod code etc. but never bothered to find a solution~
maybe w0rf0x knows more about it
Image
fustrun
prop_static
prop_static
Posts: 92
Joined: Fri Sep 11, 2009 8:23 am

Re: Adding a Music Cue with Mappadds ?

Post by fustrun »

Oh sure man no problem, i guess i'll have to cross my fingers for w0rf0x to make an apperance and by the way i'd be happy to compose a tune for you guys so if w0rf0x and you are up for it we can discuss of what you would like to hear from me, because i really love your mod and i really want to give something back !
User avatar
Shana
Lead Developer
Lead Developer
Posts: 2971
Joined: Tue Aug 29, 2006 8:12 pm
Location: Germany
Contact:

Re: Adding a Music Cue with Mappadds ?

Post by Shana »

Either make them MP3 or create a custom soundscript to precache them.

Also yea I'm all for new music, but keep in mind the track needs to be completely your work and you'll have to sign an agreement if we want to add it to Steam OC.
fustrun
prop_static
prop_static
Posts: 92
Joined: Fri Sep 11, 2009 8:23 am

Re: Adding a Music Cue with Mappadds ?

Post by fustrun »

mp3 would actually make my life even easier ! so no need to precache the file if it's MP3 ? and i leave the script written as it is now and it should work ?
So your ditching all your current main menu tunes that you have now ? since it's based on a tune from the HL2 score or it's ok since it's Valve's work ?
And i understand about the agreement, no problems there and yes the tune will be all my work :)
What style would you want me to compose ? any ideas or suggestions ? you can post youtube links.
fustrun
prop_static
prop_static
Posts: 92
Joined: Fri Sep 11, 2009 8:23 am

Re: Adding a Music Cue with Mappadds ?

Post by fustrun »

Just tried it, an mp3 file gives out the same error, and i have no idea how to create a custom script file, is there any way to precache it in the d1_trainstation-01 cfg file ?

EDIT-
I'm awesome :D pre cached it in the "game_sounds_ambient_generic.txt" file and it works !
Thank you for the help !
fustrun
prop_static
prop_static
Posts: 92
Joined: Fri Sep 11, 2009 8:23 am

Re: Adding a Music Cue with Mappadds ?

Post by fustrun »

Well i tried the "easy" way and it just dosen't work, it gives me the same console spamming thing, and the hard way just removes ALOT of the sound from the game like gunshots and voice actiong . . i think the only thing it dosent remove is footstpes :S
Is there a problem with the current way i'm doing it ? can i like overload the file if i put alot of entries in it ?
User avatar
Neico
Lead Coder
Lead Coder
Posts: 1799
Joined: Tue Aug 15, 2006 3:39 pm
Location: Germany
Contact:

Re: Adding a Music Cue with Mappadds ?

Post by Neico »

you need to load the base soundfiles too~

the soundcache property is overwriting and therefore deleting any sounds that aren't defined in that property, I think it says so on the wiki page too, maybe search for a mapadd script on the map cfg folder for an exmaple, I'm sure it's used on a map~
Image
fustrun
prop_static
prop_static
Posts: 92
Joined: Fri Sep 11, 2009 8:23 am

Re: Adding a Music Cue with Mappadds ?

Post by fustrun »

But is there anything wrong with the way i'm doing it now ? like i stated above ?
User avatar
Neico
Lead Coder
Lead Coder
Posts: 1799
Joined: Tue Aug 15, 2006 3:39 pm
Location: Germany
Contact:

Re: Adding a Music Cue with Mappadds ?

Post by Neico »

well you shouldn't change files that ship with oc because they tend to change from version to version and you would lose your data in there~
Image
fustrun
prop_static
prop_static
Posts: 92
Joined: Fri Sep 11, 2009 8:23 am

Re: Adding a Music Cue with Mappadds ?

Post by fustrun »

Ok some new development, i'm trying to add 2 ambient_generic's in one map and it starts to mess things up . . am i limited to 1 in each map ? and sometimes i get the song triggered twice . . this is how i wrote it in the mapadd.

Code: Select all

Modify
    {
        ClassName
        {
            "worldspawn"
            {
                "disableareaportals" "1"
            }
            "trigger_changelevel"
            {
                "spawngroup" "trainstation_02_spawn1"
                "transitionradius" "91"
            }
	"ambient_generic"
            {
            	             "message"   "music\mod\d1_trainstation-a.mp3"
	    	"origin"    "-5077 -1982 32"
		"spawnflags" "32" //play once
            }
	    "ambient_generic"
                 {
            	             "message"   "music\mod\d1_trainstation-b.mp3"
	    	"origin"    "-4222 -482 32"
	    	"spawnflags" "32" //play once
                 }
        }
User avatar
Shana
Lead Developer
Lead Developer
Posts: 2971
Joined: Tue Aug 29, 2006 8:12 pm
Location: Germany
Contact:

Re: Adding a Music Cue with Mappadds ?

Post by Shana »

You need to add the ambient_generic, instead you're modifying all ambient_generics in the map right now.

That's probably also why the sounds didn't get precached.
fustrun
prop_static
prop_static
Posts: 92
Joined: Fri Sep 11, 2009 8:23 am

Re: Adding a Music Cue with Mappadds ?

Post by fustrun »

This makes sense . . and that's must be the reason why it plays twice . . must be some other ambient trigger that been replaced with my song near by . . well when i put it under the "add" section i understand you don't use "classname" but just add it regulary like this

Code: Select all

Add
    {
        "ambient_generic"
        {
            "message"   "music\mod\d1_trainstation-a.mp3"
            "origin"    "-5077 -1982 32"
        }
        "logic_auto"
        {
            "spawnflags" "1"
            "OnMapSpawn" "logic_start_train,Trigger,,0,-1"
            "origin" "-9608.78 -2414.19 51.1139"
        }
        "info_player_deathmatch"
        {
            "angles" "0 0 0"
            "targetname" "trainstation_01_spawn1"
            "origin" "-5853 -1962.81 -31"
        }
        "info_player_deathmatch"
        {
            "angles" "0 0 0"
            "targetname" "trainstation_01_spawn1"
            "origin" "-5853 -2053 -31"
        }
        "info_player_deathmatch"
        {
            "angles" "0 0 0"
            "targetname" "trainstation_01_spawn1"
            "origin" "-5853 -2143 -31"
        }
        "info_player_deathmatch"
        {
            "angles" "0 90 0"
            "targetname" "trainstation_01_spawn1"
            "origin" "-5671 -2144 -31"
        }
        "info_player_deathmatch"
        {
            "angles" "0 270 0"
            "targetname" "trainstation_01_spawn1"
            "origin" "-5671 -1964 -31"
        }
        "info_player_deathmatch"
        {
            "angles" "0 90 0"
            "targetname" "trainstation_01_spawn1"
            "origin" "-5557 -2144 -31"
        }
        "point_trigger"
        {
            "spawnflags" "1"
            "StartDisabled" "1"
            "targetname" "barney_door_close_trigger"
            "TriggerOnce" "1"
            "TriggerRadius" "293"
            "OnStartTouch" "lcs_breakroom_pacer_arms,Resume,,0,-1"
            "OnStartTouch" "weapon_point_2,Cancel,,0,-1"
            "OnStartTouch" "lcs_cop_introom_preIdle,Start,,0,-1"
            "OnStartTouch" "conditions_introom_look,Enable,,0,-1"
            "OnStartTouch" "camera_tv_breen,SetOff,,0,-1"
            "OnStartTouch" "kleiner_security_camera_1,SetOnAndTurnOthersOff,,0,-1"
            "OnStartTouch" "lcs_tv_breencast,Kill,,0,-1"
            "OnStartTouch" "ss_citizen_introom_chair,BeginSequence,,0,-1"
            "OnStartTouch" "introom_door_2_slot,SetAnimation,open,0,-1"
            "OnStartTouch" "introom_door_cop_1,StartScripting,,0,-1"
            "OnStartTouch" "weapon_point_1,Cancel,,0,-1"
            "origin" "-3684 -514 28"
        }
    }
but i get nothing, no errors in the console either, any thoughts ?
Post Reply