Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
  • 0
Chameeleoh

ZDOOM DIALOG MUSIC FULLVOL?

Question

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

4 answers to this question

Recommended Posts

  • 0

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();
	}
}

 

Share this post


Link to post
  • 1

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.

Share this post


Link to post
  • 0

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? 

 

Share this post


Link to post
  • 0
Posted (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 by Chameeleoh

Share this post


Link to post

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
×