Frictional Games Forum (read-only)

Full Version: Need some help with floors.
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I want to make new footsteps sounds. I thought I could do this by going to the model editor, and edit a plane so the footsteps would sound different. But, I discovered that I couldn't load planes in the model editor.

Is there any way to do this? (Without messing with the original game redist.)


I have some knowledge on this editing, I'm not a noob. But I'm not a super pro either.

Thanks
Go to material editor. Open up whatever floor plane you'd like to make a certain sound. Under "Physics Material" (top left side of the screen), scroll down to whatever material you'd like; each is scripted to do a certain sound when collided with, but I think a few (like dirt) will make a small cloud of dust when an entity hits it.

When you're done, click "Save as...", then something semi-related to the original material:

mansionbase_floor_boards to mansionbase_floor_boards_echo


Hope that helped!
Place 7 script areas and let the sounds play.

Name the areas Steps_1, Steps_2 and so on till Steps_7

Now create an area which activates the footsteps called StartSteps and an area where when the player enters the footsteps stop, called StopSteps.

Maybe you don't even need the StopSteps. It was a long time ago i made this script.

This function lets the sounds randomly play at one of the Steps_1 to Steps_7 areas.

Code:
void OnStart()
{
AddEntityCollideCallback("Player", "StartSteps", "FuncCreakHorrors", true, 1);
}
void FuncCreakHorrors(string &in asParent, string &in asChild, int alState)
{
    if(asChild == "StartSteps") {
        float fCreak = RandFloat(0.5f,6.5f);
    
        AddTimer("creak", 2.5f+fCreak, "FuncCreakTimer");
        
        AddEntityCollideCallback("Player", "StopSteps", "FuncCreakHorrors", true, 1);
        
    } else {
        RemoveTimer("creak");
        
        AddEntityCollideCallback("Player", "StartSteps", "FuncCreakHorrors", true, 1);
    }
    
    /*DEBUG
     */
    AddDebugMessage("Player in/out creak: "+asChild, true);
}

void FuncCreakTimer(string &in asTimer)
{
    int iCreak = RandFloat(1, 7);    
    float fCreak = RandFloat(4.5f,14.5f);
    
    CreateParticleSystemAtEntity("creakPS"+iCreak, "ps_dust_falling_small_thin.ps", "Steps_"+iCreak, false);
    
    PlaySoundAtEntity("creakSound"+iCreak, "scare_wood_creak_mix.snt", "Steps_"+iCreak, 0.0f, false);
    
    AddTimer("creak", 5.5f+fCreak, "FuncCreakTimer");
    
    /*DEBUG
     */
    AddDebugMessage("Now creaking in area: "+iCreak+" Next creak in: "+(5.5f+fCreak), true);
}
//Edit: I just realised that i totally misread what you wrote. But feel free to use this anyway <.<
Thanks for the replies guys! I will check them out, and let you know if they worked.

EDIT: I'll reply again tommorow, its kinda late over here and I'm tired as hell. So talk to ya soon!
(08-24-2012, 08:37 PM)andyrockin123 Wrote: [ -> ]Go to material editor. Open up whatever floor plane you'd like to make a certain sound. Under "Physics Material" (top left side of the screen), scroll down to whatever material you'd like; each is scripted to do a certain sound when collided with, but I think a few (like dirt) will make a small cloud of dust when an entity hits it.

When you're done, click "Save as...", then something semi-related to the original material:

mansionbase_floor_boards to mansionbase_floor_boards_echo


Hope that helped!
hey thanks for the help, but how do I make a custom sound? (where do I put the custom sound file?)
You can put new sounds under root>sounds>steps, but I'm not sure how you could actually apply them in the material editor, I don't think it's just as easy as throwing in a new sound and having it appear in the editor. To me. it sounds like some config file editing; maybe Your Computer would know something about this.
For custom materials with custom sounds, you need to modify materials.cfg.
Called it.