The RTG Guy
An Ink blob
I am trying to make Sonic give that boost jet sound when he is in dashmode like in the boost games. Here is the code:
Whenever Sonic stops, he sound is still going, and when in dashmode, the sound repeats itself.
Any suggestions to help with that?
Dashmode Sound:
addHook("PlayerThink", function(player)
if (player and player.mo and player.mo.valid)
and player.dashmode >= 3*TICRATE
and not S_SoundPlaying(player.mo, sfx_boost3)
S_StartSound(player.mo, sfx_boost3)
elseif not player.dashmode >= 3*TICRATE
and S_SoundPlaying(player.mo, sfx_boost3)
S_StopSoundByID(player.mo, sfx_boost3)
end
end)
Whenever Sonic stops, he sound is still going, and when in dashmode, the sound repeats itself.
Any suggestions to help with that?