#How do I get ability sounds working?

1 messages · Page 1 of 1 (latest)

calm rose
#

I'm precaching the sound event in the KV file like this:

"precache" { "soundfile" "soundevents/game_sounds_heroes/game_sounds_lina.vsndevts" "particle" "particles/units/heroes/hero_lina/lina_spell_light_strike_array_ray_team.vpcf" "particle" "particles/units/heroes/hero_lina/lina_spell_light_strike_array.vpcf" }

and creating the sound in lua like this:

EmitSoundOnLocationForAllies( self:GetParent():GetOrigin(), "Ability.PreLightStrikeArray", self:GetCaster() )

The particles are working fine but no sound is playing.

Have I set this up wrong? And if not, where else should I look for mistakes and what resources can I use to understand how this works?

hard sonnet
#

you didn't get an error when you used GetParent? that's weird

noble garnet
#

Sometimes precache for certain items ignored by dota for unknown reasons. The only way to fix that i know is put your item precache into addon_game_mode.lua Precache function if this is a case for your item