SapphireTheGreat
Your average coder.
// Super sonic!
addHook("PlayerThink", function(player)
freeslot("sfx_hmssuper")
if player.powers[pw_super] and player.mo and player.mo.skin == "h.r"
S_StartSound(player.mo, sfx_hmssuper)
if not player.powers[pw_super] and player.mo and player.mo.skin == "h.r"
S_StopSound(player.mo, sfx_hmssuper)
end
end
end)
It should be working, but it's not it's giving the error message "This function cannot be called from within a hook or coroutine!"
addHook("PlayerThink", function(player)
freeslot("sfx_hmssuper")
if player.powers[pw_super] and player.mo and player.mo.skin == "h.r"
S_StartSound(player.mo, sfx_hmssuper)
if not player.powers[pw_super] and player.mo and player.mo.skin == "h.r"
S_StopSound(player.mo, sfx_hmssuper)
end
end
end)
It should be working, but it's not it's giving the error message "This function cannot be called from within a hook or coroutine!"