• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

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,097
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