Jump to content

Change the music in map via BehavED


Go to solution Solved by therfiles,

Recommended Posts

I am fluent in BehavED (for the most part anyway). But a couple things I don't know how to do include changing the music.

 

I looked over the source of the Deception Single Player Conversion, and just before the fight with the final boss, the music changes. Upon looking at the source files, I noticed one line.

 

set ( /*@SET_TYPES*/ "SET_MUSIC_STATE", /*@MUSIC_STATES*/ "DM_BOSS" );

 

Looked over some other files, the music was set up in the same way a normal JKA single player map is done, separate music for a lack of action, action, leaving combat, etc. Only one file was in there, BattleMusic. But this music is not called DM_BOSS, nor put in a folder called such, could not see a script called such let alone any reference to it.

 

 

So now I pose this question to you, my fellow JKHub peeps.

 

How does one simply change the music in a map via BehavED  (or some other mean)

 

 

 

P.S. You don't need to spoon feed it fully to me, I know BehavED like the back of my hand, just tell me how to get the file to play as needed.

Link to comment
  • Solution

I know the entity misc_music_change will do the trick, but that's not what you're after...I'm not sure there is a way to do it, other than triggering that ent or using the Play Sound block in Behaved and using CHAN_MUSIC (untested...). My best guess would be that ICARUS block.

 

As to the mod your referencing, he's using DMS (Dynamic Music System?...Truth is I have no idea what it stands for). It's controlled by the file dms.dat in ext_data. This is the entry of interest from Deception:

 

	semele_mine
	{
		uses	vjun2
	}
	semele_computer
	{
		uses    vjun2
	}
	semele_power
	{
		explore	yavtemp2_explore
		action	yavtemp2_action
		boss	battlemusic
}

Basically, he can reference any of these "key words" to link to some music. It's actually very efficient. Rather than replacing the physical music file, you just change the one it's linked to. For the last entry, you can see that there is multiple tracks listed, with the "mood" you mentioned by it. Using scripts, he can simply change the "mood" to BOSS, ACTION, or EXPLORE, and you get "new" music. Pretty cool.

 

P.S. You don't need to spoon feed it fully to me, I know BehavED like the back of my hand, just tell me how to get the file to play as needed.

 

:D We'll get along great

Link to comment

lol@fluent at drag and drop scripting. That's like saying "I'm fluent at breathing."

 

Hey! It still requires the user to put things in a logical, correct syntax which dictates the need for variables, parameters, and other global properties. Sure, the vehicle of the language may be accessible via a "drag and drop" interface, but it still requires amble amount of skill and knowledge. Also, I suppose you could write it without Behaved, but that would be silly! Why use an inferior tool (for example: MS Paint) when you have a more user-friendly one (GIMP). Especially when you get into complicated, nasty, nested loops and such, having an easy to use program to sort it out for you is a lifesaver!

 

Plus, it's pretty and fun! And yes. I'm fluent at breathing.

 

You sir....are awesome.

 

Thanks! Happy to help anytime. :D

 

I started a tutorial a while back...however it's not done. I hope to tidy it up sometime, but so darn busy! :(

Circa likes this
Link to comment

Hey! It still requires the user to put things in a logical, correct syntax which dictates the need for variables, parameters, and other global properties. Sure, the vehicle of the language may be accessible via a "drag and drop" interface, but it still requires amble amount of skill and knowledge. Also, I suppose you could write it without Behaved, but that would be silly! Why use an inferior tool (for example: MS Paint) when you have a more user-friendly one (GIMP). Especially when you get into complicated, nasty, nested loops and such, having an easy to use program to sort it out for you is a lifesaver!

 

I never said you should make Icarus scripts in notepad. The drag and drop model may be a "lifesaver" but Icarus is an extremely weak scripting language.

eezstreet likes this
Link to comment

I never said you should make Icarus scripts in notepad. The drag and drop model may be a "lifesaver" but Icarus is an extremely weak scripting language.

 

Sorry, I just thought you were saying that Behaved is easy to master. I agree that it's not very flexible as a language, and you have to program ghetto "work arounds" to make it all work.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...