add an audio queue when building arrows are targeted

This commit is contained in:
real_tabasco_sauce 2024-09-16 08:07:13 -07:00
parent 307fd81888
commit e4aedaf3ac
3 changed files with 20 additions and 0 deletions

View File

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8" standalone="no" ?>
<SoundGroup>
<Gain>10</Gain>
<Priority>1</Priority>
<Looping>0</Looping>
<RandOrder>1</RandOrder>
<RandPitch>1</RandPitch>
<PitchUpper>1.2</PitchUpper>
<PitchLower>0.8</PitchLower>
<Threshold>500</Threshold>
<Path>audio/attack/weapon/</Path>
<Sound>sling_210.ogg</Sound>
</SoundGroup>

View File

@ -1042,6 +1042,12 @@ var g_UnitActions =
"pushFront": pushFront
});
if (action.data.command === "attack-only" || action.data.command === "attack")
Engine.GuiInterfaceCall("PlaySound", {
"name": "focus_fire",
"entity": action.firstAbleEntity
});
if (action.data.command === "attack-only")
return true;

View File

@ -139,6 +139,7 @@
<attacked_gaia>interface/alarm/alarm_attacked_gaia.xml</attacked_gaia>
<attacked_capture>interface/alarm/alarm_attackplayer.xml</attacked_capture>
<attacked_capture_gaia>interface/alarm/alarm_attacked_gaia.xml</attacked_capture_gaia>
<focus_fire>attack/weapon/arrowfly_building.xml</focus_fire>
</SoundGroups>
</Sound>
<StatusBars>