[Solved] Disable attack notification sounds such as "Our ally's base is under attack!"

Level 5
Joined
Sep 20, 2024
Messages
31
Hello! In my maps you or your allies are constantly under attack so the sounds "Our town is under attack!" and "Our ally needs our help!" keep playing too often. This makes the maps stressful and exhausting to play for long periods of time. I would like to know if someone has succesfully disabled any of the attack notification sounds for their map. I would like the minimap colors, flashes and messages to remain, I am only interested in muting the sounds or making the sounds play less often (I think it would be best to make them play less often, maybe maximum once every 90-120 seconds). When I change the gameplay constant "Attack notification" from 30 seconds to 90 seconds or 6000 seconds, it doesn't seem to do anything, it's like the gameplay constant is broken. Or maybe I am trying to edit the wrong gameplay constant? Any help would be appreciated!
 
Last edited:
You'll have to disable the Sounds in Game Interface (or replace internal sounds) and then use Triggers to recreate the sounds as you see fit.

This isn't quite right, but the idea would be something like this:
  • Events
    • Unit - A unit is Attacked
  • Conditions
  • Actions
    • Custom script: local unit u = GetTriggerUnit()
    • Custom script: local player p = GetLocalPlayer()
    • Custom script: local integer vol = 0
    • Custom script: if IsPlayerAlly(u) and GetOwningPlayer(u) != p and GetLocalPlayer() == p then
    • Custom script: set vol = 127
    • Custom script: endif
    • Sound - Play "Our ally needs our help!" /// REPLACE WITH CUSTOM SCRIPT AND USE 'vol' FOR IT'S VOLUME
    • Custom script: set u = null
    • Custom script: set p = null
 
Last edited:
I have decided to add a custom sound which is silent and 0.25 seconds long, to mute the "Ally town under attack" sound.
In sound editor I imported the silent sound and it was automatically placed in folder "Imported->war3mapImported". But then when I go to Advanced->Game Interface->"Sound-Ally Town under attack" and I can't find the sound there. Any ideas how to fix please?

Edit: Nvm I found out how. Go to folder Sound->Interface->Warning->Human and then right click the sound file and select "replace".
 
Last edited:
I don't think you can use imported assets there.

But I used this MarineYes sound which appears to be unimplemented and act like a silent sound. It's in the Units category:

1755867334202.png


I'm doing this in the attached map, which has a system for easily recreating these Interface sounds.
 

Attachments

Last edited:
The easiest way to disable the sounds entirely is to just import empty sound files that overwrite them. If you want the sounds to play less often as opposed to not at all, you'll have to use triggers/script as @Uncle suggested.
There is a gameplay constant for this if I'm not mistaken. The default is 30 seconds wait time once the sound plays (or finishes playing).
On large scale maps with huge battles, increasing it to 120 seconds for example isn't such a bad idea :razz:
 
Back
Top