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

[Trigger] Sound Problems

Status
Not open for further replies.
Level 15
Joined
Jan 31, 2007
Messages
502
There are 2 mistakes you did.

1.if you would have read the hint at the bottom at the Play Sound GUI function you may would have noticed "Note that a 3D sound must be positiuoned to be played"
Due all your sounds in the sound editor are 3D sounds it wont play anithing
im not sure but i would suggest to use 3D sounds because i can remember thet normal sounds (if you simply uncheck all "3D sound") cannot double, means you gotta wait till its completely played till you cn play the same one again


2. but still nothing will work because your arrays are empty ;D

JASS:
scope SetSound initializer Init

private function SetSounds takes nothing returns nothing

set udg_SoundArray1[1] = gg_snd_FragBombs
set udg_SoundArray1[2] = null 
set udg_SoundArray1[3] = null
set udg_SoundArray1[4] = null
set udg_SoundArray1[5] = gg_snd_FragBombs
set udg_SoundArray1[6] = null
set udg_SoundArray1[7] = null
set udg_SoundArray1[8] = null
set udg_SoundArray1[9] = gg_snd_FragBombs
set udg_SoundArray1[10] = null
set udg_SoundArray1[11] = null
set udg_SoundArray1[12] = null
set udg_SoundArray1[13] = gg_snd_FragBombs
set udg_SoundArray1[14] = null
set udg_SoundArray1[15] = null
set udg_SoundArray1[16] = null

set udg_SoundArray2[1] = null 
set udg_SoundArray2[2] = null 
set udg_SoundArray2[3] = null
set udg_SoundArray2[4] = null 
set udg_SoundArray2[5] = gg_snd_ThunderClapCaster
set udg_SoundArray2[6] = null
set udg_SoundArray2[7] = null
set udg_SoundArray2[8] = null 
set udg_SoundArray2[9] = null
set udg_SoundArray2[10] = null 
set udg_SoundArray2[11] = null
set udg_SoundArray2[12] = null
set udg_SoundArray2[13] = gg_snd_ThunderClapCaster
set udg_SoundArray2[14] = null
set udg_SoundArray2[15] = null
set udg_SoundArray2[16] = null

set udg_SoundArray3[1] = gg_snd_AlchemistAcidBurnMissileDeath1
set udg_SoundArray3[2] = null 
set udg_SoundArray3[3] = gg_snd_AlchemistAcidBurnMissileDeath1
set udg_SoundArray3[4] = null 
set udg_SoundArray3[5] = gg_snd_AlchemistAcidBurnMissileDeath1
set udg_SoundArray3[6] = null
set udg_SoundArray3[7] = gg_snd_AlchemistAcidBurnMissileDeath1
set udg_SoundArray3[8] = null 
set udg_SoundArray3[9] = gg_snd_AlchemistAcidBurnMissileDeath1
set udg_SoundArray3[10] = null 
set udg_SoundArray3[11] = gg_snd_AlchemistAcidBurnMissileDeath1
set udg_SoundArray3[12] = null
set udg_SoundArray3[13] = gg_snd_AlchemistAcidBurnMissileDeath1
set udg_SoundArray3[14] = null
set udg_SoundArray3[15] = gg_snd_AlchemistAcidBurnMissileDeath1
set udg_SoundArray3[16] = null

set udg_SoundArray4[1] = gg_snd_LightningBolt
set udg_SoundArray4[2] = null 
set udg_SoundArray4[3] = null 
set udg_SoundArray4[4] = null 
set udg_SoundArray4[5] = null 
set udg_SoundArray4[6] = null
set udg_SoundArray4[7] = null 
set udg_SoundArray4[8] = null 
set udg_SoundArray4[9] = null 
set udg_SoundArray4[10] = null 
set udg_SoundArray4[11] = null 
set udg_SoundArray4[12] = null
set udg_SoundArray4[13] = null 
set udg_SoundArray4[14] = null
set udg_SoundArray4[15] = null 
set udg_SoundArray4[16] = null

endfunction

//===========================================================================
private function Init takes nothing returns nothing
    local trigger t = CreateTrigger()
    call TriggerAddAction(t, function SetSounds)
endfunction

endscope

Your are initializing the Init function which adds the needed action to the trigger t
but .. huh?... wheres the event ?!?! :p You dont got an event so this SetSounds function will never ever run

to fix that you can add a event.. but better run the trigger directly via initializing

JASS:
scope SetSound initializer SetSounds

private function SetSounds takes nothing returns nothing

set udg_SoundArray1[1] = gg_snd_FragBombs
set udg_SoundArray1[2] = null 
set udg_SoundArray1[3] = null
set udg_SoundArray1[4] = null
set udg_SoundArray1[5] = gg_snd_FragBombs
set udg_SoundArray1[6] = null
set udg_SoundArray1[7] = null
set udg_SoundArray1[8] = null
set udg_SoundArray1[9] = gg_snd_FragBombs
set udg_SoundArray1[10] = null
set udg_SoundArray1[11] = null
set udg_SoundArray1[12] = null
set udg_SoundArray1[13] = gg_snd_FragBombs
set udg_SoundArray1[14] = null
set udg_SoundArray1[15] = null
set udg_SoundArray1[16] = null

set udg_SoundArray2[1] = null 
set udg_SoundArray2[2] = null 
set udg_SoundArray2[3] = null
set udg_SoundArray2[4] = null 
set udg_SoundArray2[5] = gg_snd_ThunderClapCaster
set udg_SoundArray2[6] = null
set udg_SoundArray2[7] = null
set udg_SoundArray2[8] = null 
set udg_SoundArray2[9] = null
set udg_SoundArray2[10] = null 
set udg_SoundArray2[11] = null
set udg_SoundArray2[12] = null
set udg_SoundArray2[13] = gg_snd_ThunderClapCaster
set udg_SoundArray2[14] = null
set udg_SoundArray2[15] = null
set udg_SoundArray2[16] = null

set udg_SoundArray3[1] = gg_snd_AlchemistAcidBurnMissileDeath1
set udg_SoundArray3[2] = null 
set udg_SoundArray3[3] = gg_snd_AlchemistAcidBurnMissileDeath1
set udg_SoundArray3[4] = null 
set udg_SoundArray3[5] = gg_snd_AlchemistAcidBurnMissileDeath1
set udg_SoundArray3[6] = null
set udg_SoundArray3[7] = gg_snd_AlchemistAcidBurnMissileDeath1
set udg_SoundArray3[8] = null 
set udg_SoundArray3[9] = gg_snd_AlchemistAcidBurnMissileDeath1
set udg_SoundArray3[10] = null 
set udg_SoundArray3[11] = gg_snd_AlchemistAcidBurnMissileDeath1
set udg_SoundArray3[12] = null
set udg_SoundArray3[13] = gg_snd_AlchemistAcidBurnMissileDeath1
set udg_SoundArray3[14] = null
set udg_SoundArray3[15] = gg_snd_AlchemistAcidBurnMissileDeath1
set udg_SoundArray3[16] = null

set udg_SoundArray4[1] = gg_snd_LightningBolt
set udg_SoundArray4[2] = null 
set udg_SoundArray4[3] = null 
set udg_SoundArray4[4] = null 
set udg_SoundArray4[5] = null 
set udg_SoundArray4[6] = null
set udg_SoundArray4[7] = null 
set udg_SoundArray4[8] = null 
set udg_SoundArray4[9] = null 
set udg_SoundArray4[10] = null 
set udg_SoundArray4[11] = null 
set udg_SoundArray4[12] = null
set udg_SoundArray4[13] = null 
set udg_SoundArray4[14] = null
set udg_SoundArray4[15] = null 
set udg_SoundArray4[16] = null

endfunction

endscope


btw -
  • (Number of units in (Units in (Playable map area))) (>=) 17
what does units have to do with that? i guess nothing
i guess you meant
  • (BeatNumber) (>=) 17
quite funny idea you got
 
Level 36
Joined
Jul 1, 2007
Messages
6,677
Thanks a lot. Most of this was just stupid mistakes on my part I guess; I don't open the trigger editor too much xD

I have another problem though. Whether I use 3D sounds or regular sounds, for some reason I can't get the loop to play properly.

Could someone please test the map and try to identify the problem?
 

Attachments

  • BeatMaster.w3x
    15.9 KB · Views: 70
Last edited:
Level 15
Joined
Jan 31, 2007
Messages
502
Heres the Problem

Im not really familiar with sounds and i never read something
its just my own experience
And as far as i know there can be played one sound at the sime time
only after this sound completely finished (look duration in the sound editor) another one can be played ( i guess even a faster pitch that the sound is shorter does not affect this)

and afaik 3D sounds can be played after the same sound has finished
you can play sound A,B, and C at the same time. but you can play A only after the first A has finished again

To solve this kick blizzards ass or try to import own shorter sounds that you also avoid changing the pitch in the editor

Another option could be (dunno if it works) try to create multiple variables of the same sound for the ones which are played very fast
instead of playing A,A,A,A verxy fast try to play A1,A2,A1,A2 or even with 3
but thats just an idea which may does not even work
 
See? I have this issue myself quite ago: http://www.hiveworkshop.com/forums/world-editor-help-zone-98/sound-issue-help-133501/
What i've managed to figure out is that the same sound cannot be played in a specified short time space again and again (meaning in a seriate rate); it will be overriding the previous sound. If you have time, http://www.hiveworkshop.com/forums/...mission-thread-131809/index3.html#post1194527 , check it. This is my hero entry. I tried to add this "special effect", that, up to the percentage life of the hero, her heartbeat will beat faster and faster, when percentage get lower. You can see that the sound is not played faster and faster in a row, but one on another, beating at the same time, causing some lag afterwards.
 
Level 15
Joined
Jan 31, 2007
Messages
502
Hm... ;D got anotheer idea
due Play Sound and Play 3D sound sucks alot
another idea would be playing sounds via models or special effects
I dont know how to add them on you own to a custom model but you can replace ingame sounds and then create a million effects which should all play their sounds without interrupting anything
 
Status
Not open for further replies.
Top