Ok can any1 exaplin me how this should be done?
i tried 100 diffrent ways. storing sound as sound give me "cannot convert sound to string or string to sound", i tried diffrent functions and my sound is only played once. then when i cast spell again theres no sound....
also does it leak anyway? how i should remove this
JASS:
function Trig_Time_Pause_Actions takes nothing returns nothing
local location loc = GetSpellTargetLoc()
local unit u
local real x= 2.00 + ( 1 * I2R(GetUnitAbilityLevelSwapped(GetSpellAbilityId(), GetTriggerUnit())))
local group grp = GetUnitsInRangeOfLocMatching(( 100.00 + ( 100.00 * I2R(GetUnitAbilityLevelSwapped(GetSpellAbilityId(), GetTriggerUnit())) ) ), loc, Condition(function Trig_Time_Pause_Func002002003))
set u = CreateUnitAtLoc(GetOwningPlayer(GetTriggerUnit()),039;H007039;,loc, 270)
call UnitApplyTimedLife(u,039;BTLF039;,x)
call SetUnitScale(u,(0.14*x),(0.14*x),1)
call ForGroupBJ( grp, function Trig_Time_Pause_Func003A )
call PlaySoundOnUnitBJ( gg_snd_time, 35, GetTriggerUnit())
call StopMusic(true)
call TriggerSleepAction(x)
call ForGroupBJ( grp, function Trig_Time_Pause_Func005A )
call ResumeMusic()
call StopSound(gg_snd_time,true,true)
call RemoveLocation(loc)
set loc=null
call DestroyGroup(grp)
set grp = null
set u = null
endfunction
i tried 100 diffrent ways. storing sound as sound give me "cannot convert sound to string or string to sound", i tried diffrent functions and my sound is only played once. then when i cast spell again theres no sound....
also does it leak anyway? how i should remove this