global_temp_sound_volume_for_say_events = 0

say_widget.sound_volume_part = 1

function quest.OnOpenSay(_is_sound)
	if _is_sound then
        global_temp_sound_volume_for_say_events = sf.core.g_Application.GetAudioManager().GetGroupVolume("sound")
		sf.core.g_Application.GetAudioManager().SetGroupVolume("sound", global_temp_sound_volume_for_say_events*say_widget.sound_volume_part)
	end
end

function quest.OnCloseSay(_is_sound)
	if _is_sound then
        if global_temp_sound_volume_for_say_events*say_widget.sound_volume_part == sf.core.g_Application.GetAudioManager().GetGroupVolume("sound") then
			sf.core.g_Application.GetAudioManager().SetGroupVolume("sound", global_temp_sound_volume_for_say_events)
		end
	end

end
