bengar Posted May 28, 2003 Share Posted May 28, 2003 HI Can someone tell me how to make the "death music" play when Kyle dies in a sp map? Thanks Bengar Link to comment Share on other sites More sharing options...
Captian Posted May 28, 2003 Share Posted May 28, 2003 ive never noticed any death music... juist kyle screaming Link to comment Share on other sites More sharing options...
Obsidian-Jovani Posted May 28, 2003 Share Posted May 28, 2003 If you really wanted to play the same music after Kyle dies I'm sure you could just create a script to do this. I wonder if the sample SP scripts has this very thing in them... Link to comment Share on other sites More sharing options...
War Master Posted May 28, 2003 Share Posted May 28, 2003 In my opinion, dynamic music is the best way to go. If you're using target_speakers or target_play_music or something maybe you can give kyle a deathscript that will play the death music. (I don't want to be an Ewok:( ) Link to comment Share on other sites More sharing options...
Obsidian-Jovani Posted May 28, 2003 Share Posted May 28, 2003 I know that NPCs can have a "deathscript" key, but I don't think the info_player (kyle) can have one in Radiant. However, I did notice in the ICARIUS manual that you can use the command SET_DEATHSCRIPT inside of a script and it can be used on the info_player (kyle) ============ Glow Time!!! Link to comment Share on other sites More sharing options...
bengar Posted May 28, 2003 Author Share Posted May 28, 2003 I tried so many different things that i cant remember but I think I tried the deathscript on Kyle before and it didnt work. I'll give it a try again... I've also tried the SET_MUSIC_STATE script on Kyle before because you have the option of setting the DM_Death music but I guess i didnt do it right because it didnt work. I'll give the Death_Script a try. Bengar Link to comment Share on other sites More sharing options...
Leslie Judge Posted May 28, 2003 Share Posted May 28, 2003 You can also try to use a target_play_music and target it from the info_player_start by setting an "NPC_target" for it. For example: info_player_start key: NPC_target value: deathmusic target_play_music key: targetname value: deathmusic Link to comment Share on other sites More sharing options...
War Master Posted May 28, 2003 Share Posted May 28, 2003 bengar, would you consider using dynamic music? Your problem would be solved easily. That's what Raven used with their sp maps. Link to comment Share on other sites More sharing options...
Leslie Judge Posted May 28, 2003 Share Posted May 28, 2003 I think that's not good for a death music. The dynamic music definition file defines only eploration and attack music. Link to comment Share on other sites More sharing options...
bengar Posted May 29, 2003 Author Share Posted May 29, 2003 Leslie, I've just tried your NPC_target stuff on my infoplayer start and no luck. Then i tried using a closetarget and aimed it at the target_play_music... no luck. Obsidian-Jovani, I just tried using deathscript and i made a little script that would play that music but it still didnt work. Unless i didnt do it right... Info_Player_Start key: deathscript value: map/kyle_death_music was i suppose to aim the info_player_start at a target_scriptrunner? if so, how would i target the info_player_start to the scriptrunner? using a key of target or NPC_target? . War Master, id use dynamic music but i dont know how. Thanks for everyones help Bengar Link to comment Share on other sites More sharing options...
Obsidian-Jovani Posted May 29, 2003 Share Posted May 29, 2003 Originally posted by bengar was i suppose to aim the info_player_start at a target_scriptrunner? BINGO! Bengar, today is your lucky day. I got this to work. Here is what you do: 1.) Create a script that will play your death music. It looks like this: //Generated by BehavEd rem ( "deathmusic.ibi" ); rem ( "Death Music Script" ); rem ( "Script by: Obsidian Jovani" ); rem ( "Play this music when Kyle dies" ); sound ( /*@CHANNELS*/ CHAN_AUTO, "pathname/musicfile.mp3" ); 2.) Create a script that will run immediately when the game starts. It looks like this: //Generated by BehavEd rem ( "kyle_death.ibi" ); affect ( "kyle", /*@AFFECT_TYPE*/ FLUSH ) { set ( /*@SET_TYPES*/ "SET_DEATHSCRIPT", "pathname/scriptname" ); } 3.) Create a target_scriptrunner that will run kyle_death.ibi Key: Usescript Value: pathname/scriptname Then first select your info_player and then your scriptrunner. Connect them together with CTRL+K Compile your map, compile your scripts, and test it out. Any questions you have just post em here. Link to comment Share on other sites More sharing options...
bengar Posted May 29, 2003 Author Share Posted May 29, 2003 Obsidian-Jovani, I used your script and it worked, I heard the death music.... I appreciate your help... but i had music playing in the background in my level.... so when i died, i heard the death music but i still heard the background music and my background music continued playing after the death music. I think if i can make the script trigger a target_play_music then deathmusic should override the music playing in the level. Do you know how to make a script trigger a target_play_music? Thanks again....... if i figure it out i will post again here Bengar Link to comment Share on other sites More sharing options...
War Master Posted May 29, 2003 Share Posted May 29, 2003 Let me get this straight, are you asking for the death music that plays when kyle dies in Raven's maps? The one called death_music.mp3? With dynamic music it'll play it for you when kyle dies. Extract dms.dat from assets0.pk3, it's in the ext_data folder. Go to the properties of the file by right clicking it and uncheck read_only. Open it up with Notepad and scroll down to the bottom of the file. If you study it a little bit you should recognize a pattern of how the music is assigned to different maps. Let's say you wanted the kejim_post dynamic music for your map, this is what you would add to the file insertmapnamehere { uses kejim_post } Save and close the file. Make a pk3 file out of the ext_data folder where the dms.dat is located and you should be all set(If I didn't forget anything) Note: It must be in a pk3 file to work. Link to comment Share on other sites More sharing options...
Obsidian-Jovani Posted May 29, 2003 Share Posted May 29, 2003 Originally posted by bengar i had music playing in the background in my level.... so when i died, i heard the death music but i still heard the background music and my background music continued playing after the death music. With what method are you playing background music? If it is with an entity you could add the remove command to the deathmusic.ibi right before you play the new music. So it might look something like this: remove ("targetname"); where targetname would be the targetname of your background music entity. Not sure if this would work. Just a thought. Link to comment Share on other sites More sharing options...
bengar Posted May 29, 2003 Author Share Posted May 29, 2003 Let me get this straight, are you asking for the death music that plays when kyle dies in Raven's maps? The one called death_music.mp3? With dynamic music it'll play it for you when kyle dies. Yes War Master, thats the death music i am talking about. Right now i have triggers attached to target_play_music throughout my level. Thats how i change the music. I wanted to have the dynamic music but i didnt know how to make it work. Im gonna try your suggestions tommorow Thanks War Master and Obsidian-Jovani Bengar Link to comment Share on other sites More sharing options...
bengar Posted June 1, 2003 Author Share Posted June 1, 2003 War Master, LJ and O-J... and anyone else listening... I was able to get the Dynamic music going... I cant believe it. It works well... the death music plays perfectly and the and the explore and action music play right on cue. You guys are the best and your in my credits. I have one more question now. How do i get the the "boss" music to play. I experimented by using the "yavin_final" music for my level and i thought that if i faced a boss type enemy like Tavion that the boss music might automatically play but it didnt. How do i get the boss music to play? Thanks again everyone Bengar Link to comment Share on other sites More sharing options...
War Master Posted June 1, 2003 Share Posted June 1, 2003 I was never able to change the dynamic state through the ICARUS commands. It was a while ago since I tried but the script would look something like this //Generated by BehavEd rem ( "comment" ); set ( /*@SET_TYPES*/ "SET_MUSIC_STATE", /*@MUSIC_STATES*/ "DM_BOSS" ); If you take the demo map by Raven as an example, it plays boss music when you engage the Reborn. If you look at the scripts for the demo, you can see Raven attempted to change the dynamic state of the music through scripts. Look at bossmusic_go and bossdead scripts. Now look at bossmusic, it's got a use command. I suspect they may have used a target_play_music. I don't know, it's all theories right now. If you can change the dynamic state with the ICARUS commands then great. If not try a target_play_music. Link to comment Share on other sites More sharing options...
aazell Posted June 4, 2003 Share Posted June 4, 2003 Did you want to play your own death music as in a custom peice or prehaps a particular peice of music from in the game? If so then see above. If you just want dynamic music in your level that changes when you get into combat or when you die then you just need to create a worldspawn entity and give it the key soundset and then the name of the level you want to take the music from. If you go into the assets0.pk3 and look in the music folder just take the name of whatever level folder you're after and plonk it in your worldspawn properties under the soundset key. Bingo! Dynamic music. (I may have totally missed the point but all the other explainations above seem to be really complex) Link to comment Share on other sites More sharing options...
bengar Posted June 4, 2003 Author Share Posted June 4, 2003 I forgot to post back but ... aazel, I got the dynamic music working following War Masters advise... and I also looked at LJ's site for some help too... http://www.geocities.com/birolaszlo/ I got my boss music by making a boss music script like JO did in the demo... it works. thanks again everyone Bengar Link to comment Share on other sites More sharing options...
War Master Posted June 4, 2003 Share Posted June 4, 2003 aazell, I tried adding soundset:kejim_base to the woldspawn and it didn't work. But wouldn't there be a conflict if you assign ambient soundsets to different areas of your maps. If I triggered a specific soundset for a hangar, ns_hangar, would the music turn off when the player hits the trigger? Link to comment Share on other sites More sharing options...
aazell Posted June 5, 2003 Share Posted June 5, 2003 Hmmm prehaps I didn't mean soundset. Try adding the key "music" to the worldspawn brush then add the music folder name as I stated above. Sorry I'm at work and so I can't get to my map's at the moment. Link to comment Share on other sites More sharing options...
War Master Posted June 5, 2003 Share Posted June 5, 2003 Yeah! That works. It'll save me some pk3 size for my project. Thanks. Link to comment Share on other sites More sharing options...
aazell Posted June 5, 2003 Share Posted June 5, 2003 I was totally blown away by how easy that was to do when I first found out. There were so many posts that made it seem so bloody difficult. Glad I could help out. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.