@Baertram Is it possible to have a sound play even when the light attacks miss? I'm able to get sounds to play on successful attacks using the Light Attack Helper Addon. This section seems to handle the combat event for light and heavy attacks.
function LightAttackHelper.onCombatEvent(_, _, _, abilityName, _, abilityActionSlotType, sourceName, _, _, _, hitValue)
if abilityActionSlotType == ACTION_SLOT_TYPE_LIGHT_ATTACK and LightAttackHelper.playerName == sourceName and abilityName == GetString(LAH_LIGHT_ATTACK) then
PlaySound("Map_Auto_Navigation_Begin_Zoom") --good
LightAttackHelper.castingHeavyAttack = false
LightAttackHelper.usedAbilityDuringHeavyAttack = false
--d("LA")
LightAttackHelper.setCounter(LightAttackHelper.LightAttackCounter + 1)
LightAttackHelper.updateRatio(true)
elseif abilityActionSlotType == ACTION_SLOT_TYPE_HEAVY_ATTACK then
if abilityName == GetString(LAH_HEAVY_ATTACK) and LightAttackHelper.playerName == sourceName then
LightAttackHelper.castingHeavyAttack = false
LightAttackHelper.usedAbilityDuringHeavyAttack = false
if LightAttackHelper.savedVariables.countHeavyAttacks then
LightAttackHelper.setCounter(LightAttackHelper.LightAttackCounter + 1)
LightAttackHelper.updateRatio(true)
end
--d("HA")
end
end
end
|