• 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.

Sounds <> Leak

Status
Not open for further replies.

hdm

hdm

Level 9
Joined
Nov 19, 2011
Messages
384
Using GUI. What does this mean ? Create sounds during runtime ? There is no way I can use them ?
 
Level 26
Joined
Aug 18, 2009
Messages
4,099
In GUI, you can only use the sounds you have listed in the sound editor. They auto-inject the needed jass lines for their setup and then provide you variables you can address in GUI.

In jass, there are functions like

native CreateSound takes string fileName, boolean looping, boolean is3D, boolean stopwhenoutofrange, integer fadeInRate, integer fadeOutRate, string eaxSetting returns sound

so that actually allows you to spawn new sound handles and ofc these handles should be destroyed if no longer needed. The advantage is that the sound can be constructed from a string path dynamically, there are more options and you can have multiple instances of the same sound file in order to play them in parallel, although that is limited.
 
Status
Not open for further replies.
Top