• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[General] Adding Custom Sound to Ability

Status
Not open for further replies.
Hello guys, i'm using custom sounds and the problem is that i want the sounds to be heard if they are only in the player's camera range, else you stop hearing them ( just like the default abilities' sounds).
I uploaded the sound that i want to use and i tried this trigger. The problem is that the sound is heard throughout the entire map not in the area where it's being cast.

Cast Sound
Events
Unit - A unit Begins casting an ability
Conditions
(Ability being cast) Equal to Crap
Actions
Set TempPointSS = (Position of (Target unit of ability being cast))
Sound - Play Crap_Sound <gen> at 100.00% volume, located at TempPointSS with Z offset 0.00
Custom script: call RemoveLocation( udg_TempPointSS )
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,198
As Alok has hinted, you will need to configure the sound so that it has appropriate 3D properties.

I also think one needs to locally play the sound only if the point is visible to the player. Otherwise people will be able to hear it through the fog of war, which can then indirectly reveal the location of units. This also applies for special effects, which must only use a model (still need to be created for all players) when visible by the player.
 
Status
Not open for further replies.
Top