• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[vJASS] Play 3D Sound

Status
Not open for further replies.
Level 17
Joined
Feb 11, 2011
Messages
1,860
Hi,

I based a lightning spell off the Channel spell. I want to play the "LightningBolt.wav" sound when the spell is cast. The problem is that when I set the "Sound - Effect Sound" field of the spell to the desired sound, it doesn't play. I figured that I would have to trigger the sound. Here is what I have so far:
JASS:
local sound snd = CreateSound("Abilities\\Spells\\Orc\\LightningBolt\\LightningBolt.wav", false, true, true, 12700, 12700, "")
call StartSound(snd)
call SetSoundPlayPosition(snd, 3)
call SetSoundPosition(snd, GetUnitX(.caster), GetUnitY(.caster), 0)
call SetSoundChannel(snd, 11)
call SetSoundDistanceCutoff(snd, 3000)
call SetSoundVolume(snd, 122)
call KillSoundWhenDone(snd)
set snd = null
Am I missing an important function?

Thanks for your help.
 
Status
Not open for further replies.
Top