Frictional Games Forum (read-only)

Full Version: PlayMusic seems to come from a direction
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
i used the scare_wall_stomp1.ogg and looped it, to create a bass bump similar to the slender ambience. but it seems to be 3d, and comes from the middle of the map. how can i make it come from the player? do i have to use PlaySoundAtEntity? if so, how can i make that loop?

PlayMusic("scare_wall_stomp1.ogg", true, 2, 4, 1, false);
This is not meant to be a music file.
I would rather create one myself, or what i did in Digressiophobia:

Have a timer call itself every, i don't know, 5 second maybe?

So every 5 time you'll hear the sound, with playsoundatentity.
You could use (below), I think and just loop that.

PlayGuiSound("sound.snt", 0.0f);

0.0f is volume.



AddTimer("soundtimer", 5.0f, "TimerSound");

void TimerSound(string &in asTimer)
{
PlayGuiSound("sound.snt", 0.0f);
AddTimer("soundtimer", 5.0f, "TimerSound");
}