- Joined
- Dec 12, 2012
- Messages
- 1,007
Hello,
I have a problem with the function GetLastPlayedSound, it just doesn't work when I want to use it in my code... Here is my trigger:
The problem is, that this only works if I manually play the sound by another trigger, but not if I simply click on the unit and it says exactly the same sound... So I don't get the difference in here?
Greetings,
lfh
I have a problem with the function GetLastPlayedSound, it just doesn't work when I want to use it in my code... Here is my trigger:
JASS:
function Trig_test_Actions takes nothing returns nothing
if (GetLastPlayedSound() == gg_snd_HeroBladeMasterWhat1) then
call DisplayTextToForce( GetPlayersAll(), "Soundcheck" )
endif
endfunction
//===========================================================================
function InitTrig_test takes nothing returns nothing
set gg_trg_test = CreateTrigger( )
call TriggerRegisterTimerEventPeriodic( gg_trg_test, 0.02 )
call TriggerAddAction( gg_trg_test, function Trig_test_Actions )
endfunction
The problem is, that this only works if I manually play the sound by another trigger, but not if I simply click on the unit and it says exactly the same sound... So I don't get the difference in here?
Greetings,
lfh