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

[Trigger] Question about sounds

Status
Not open for further replies.

ABM

ABM

Level 7
Joined
Jul 13, 2005
Messages
279
hi everyone,

i would like to know if there is a way to dynamically play an ambience sound in an area, the ambience sound can be 3d sound in doesn't matter...
the only thin is that player can hear the music/ambient/sound when they enter the area and that the sound can be changed ingame.

here is the exact thing:
3x3= 9 area on the map
if area can be affected by different weather wich will be accompanied by their ambient sound.
if weather is rain, then sound will be (ashenval rain),
if sunny, no sound or a sound displaying heat
if windy, then sound will be Scourgegluescreen
etc...
but only for the area concerned, outside the area sound will be none or different depending on situation(weather), also the map is for 10 player so each player here the sound of the area he is in and not the sound of other area.

any suggestion?

also i heard sound leak, so if i destroy a sound before change it (inside the area) will it be possible to play it later again, or should i just use stop sound?
 
Level 13
Joined
Sep 13, 2010
Messages
550
Sounds DO Leak! They one handle and additional memory at the sound's size( if you play and /destroy/ a sound of 1 MB, it will leak 1 MB memory too ). This why mag made sound tools which recycles the sounds instead /destroying/, it uses the same sound again and again.

I repeat, DESTROYING SOUNDS* WILL LEAK SOUNDS*

*this also applies for every file-using handle( and ofc also preloaders ), such as special effects or images, I dunno what else.
 

ABM

ABM

Level 7
Joined
Jul 13, 2005
Messages
279
ok thanks Geries

so if i just stop the sound, and use another one, then stop, and use the first one again it doesn't leak...
(it just leak for the sounds loaded but only once for all sounds for the entire game)
 
Status
Not open for further replies.
Top