• 🏆 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!

[vJASS] I can save, but the sounds don't start (SoundTools)

Status
Not open for further replies.
Level 19
Joined
Oct 12, 2007
Messages
1,821
I'm using SoundTools since some time now, and recently I wanted to add sounds to my cinematic system.

This is what should work in my system. I can save it as intended, but it doesn't work because ingame it doesn't play the sounds at all.
What am I doing wrong?

///This is where I create all sounds so I can use them in other systems/stuff
JASS:
library SoundDocumentation initalizer init requires SoundTools
globals
    integer array BossFightSounds
endglobals

private function init takes nothing returns nothing
    set BossFightSounds[0] = NewSound("Sound\\Ambient\\DoodadEffects\\FlashBack1Second.wav", 2178, false, false)
endfunction
endlibrary

///This is in the cinematic system
JASS:
function AddSound takes player p, integer s returns nothing
    call RunSoundForPlayer(s, p)
endfunction

///How I want it to work:
///call AddSound(p, BossFightSounds[0])
///
///That should start the sound for the given player.. but it doesn't..:(
 
Status
Not open for further replies.
Top