Chameeleoh Posted March 8 Hello, Doomworld. playing with dialog in my current project. map open, I set music vol to 0.0. but whenever I talk to my first NPC it always just plays music again. I've tried to find a fix which lead me to a GitHub link with some code that looks like this. I don't want to link GitHub cause I heard they got hacked. but this is the code I'm not sure where to even use this? anyone have experience with this? override void OnDestroy() { if (mDialogueLines != null) mDialogueLines.Destroy(); SetMusicVolume (1); SetMusicVolume (Level.MusicVolume); Super.OnDestroy(); } 0 Share this post Link to post
0 Kan3 Posted March 9 Alright, to test it out you'll need to create a ZSCRIPT lump in Slade3 and make a new ConversationMenu class (unfortunately there are no wiki pages about this class) that needs to inherit from the standard ConversationMenu class. In there you put your virtual function override, like so: class BegoneMusicConvMenu : ConversationMenu { override void OnDestroy() { if (mDialogueLines != null) mDialogueLines.Destroy(); SetMusicVolume(1); SetMusicVolume (Level.MusicVolume); Super.OnDestroy(); } } 1 Share this post Link to post
1 Kan3 Posted March 8 What do you mean by "dialog music"? If you set the music ti be off in the in-game menu, but when you finish to talk to a npc the music gets back, it feels like a bug to me. This is the actual code you can find in GZDoom 4.11 for the ConversationMenu class: override void OnDestroy() { if (mDialogueLines != null) mDialogueLines.Destroy(); SetMusicVolume (Level.MusicVolume); Super.OnDestroy(); } Which is exactly what you got there, but without the SetMusicVolume(1). You don't need that at all, especially because you're setting the music volume back to 100% and you just said that you don't want that. 1 Share this post Link to post
0 Chameeleoh Posted March 9 Well. I just mean the music for the map. I have a open script similiar to this script 1 open { //among otherthings left out here SetMusicVolume(0.0) } But when i hit my first convo with my npc it just plays the music like nothing ever happened. Then as soon as im out of dialog it goes back to normal. But its only with this first npc, by the time the player comes across another ive alrdy done a music track swap and faded the volume back in. The code i posted above was from a github link "fix" for this issue i had found online. But im not sure where to inject that code statement. Would it go in dialog? Or my map scripts? 0 Share this post Link to post
0 Chameeleoh Posted March 9 (edited) I will try this soon and let you know thank you! Well Unfortunatley that did not work for me. but i found a simple fix for that particular npc convo. i just did Script 1 enter { SetMusicVolume(0.0); SetMusic(""); //among other random functions } thank you for your help! Edited March 9 by Chameeleoh 0 Share this post Link to post
Hello, Doomworld.
playing with dialog in my current project. map open, I set music vol to 0.0.
but whenever I talk to my first NPC it always just plays music again.
I've tried to find a fix which lead me to a GitHub link with some code that looks like this.
I don't want to link GitHub cause I heard they got hacked.
but this is the code
I'm not sure where to even use this? anyone have experience with this?
override void OnDestroy()
{
if (mDialogueLines != null) mDialogueLines.Destroy();
SetMusicVolume (1);
SetMusicVolume (Level.MusicVolume);
Super.OnDestroy();
}
Share this post
Link to post