Phantom-blade
Door
Title says it all, How do you make stepping sounds, (Multiple sounds) And similar to Tails from Sonic R Making step sounds when running: Flying sounds? Can somebody help me?
SRB2 Christmas v0.96 actually had this. Modify the player WALK states to where the frame where his foot is on the ground calls A_PlaySound.
freeslot("sfx_runl") //Run left
S_sfx[sfx_runl] = {false, 64, SF_NOMULTIPLESOUND|SF_OUTSIDESOUND}
freeslot("sfx_runr") //Run right
S_sfx[sfx_runr] = {false, 64, SF_NOMULTIPLESOUND|SF_OUTSIDESOUND}
freeslot("sfx_runuw") //Run underwater
S_sfx[sfx_runr] = {false, 64, SF_NOINTERRUPT|SF_OUTSIDESOUND}
addHook("ThinkFrame", do
for player in players.iterate do
if (player.mo)
if (player.mo.eflags & MFE_UNDERWATER)
if (player.mo.state==S_PLAY_RUN1) or (player.mo.state==S_PLAY_RUN8)
S_StartSound(player.mo, sfx_runuw)
end
else
if (player.mo.state==S_PLAY_RUN1) or (player.mo.state==S_PLAY_RUN3) or (player.mo.state==S_PLAY_RUN5) or (player.mo.state==S_PLAY_RUN7) or (player.mo.state==S_PLAY_SPD1) or (player.mo.state==S_PLAY_SPD3)
if not (player.mo.eflags & MFE_GOOWATER)
if not (player.mo.eflags & MFE_TOUCHWATER)
S_StartSound(player.mo, sfx_runl)
end
end
end
if (player.mo.state==S_PLAY_RUN2) or (player.mo.state==S_PLAY_RUN4) or (player.mo.state==S_PLAY_RUN6) or (player.mo.state==S_PLAY_RUN8) or (player.mo.state==S_PLAY_SPD2) or (player.mo.state==S_PLAY_SPD4)
if not (player.mo.eflags & MFE_GOOWATER)
if not (player.mo.eflags & MFE_TOUCHWATER)
S_StartSound(player.mo, sfx_runr)
end
end
end
end
end
end
end)