Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Need some help with floors.
Melvin Offline
Member

Posts: 245
Threads: 38
Joined: Jun 2012
Reputation: 5
#1
Need some help with floors.

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

[Image: 25F7U37.png]
(This post was last modified: 08-25-2012, 04:25 PM by Melvin.)
08-24-2012, 08:31 PM
Website Find
Adny Offline
Posting Freak

Posts: 1,766
Threads: 6
Joined: Mar 2012
Reputation: 173
#2
RE: Need some help with floors.

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!

I rate it 3 memes.
08-24-2012, 08:37 PM
Find
Ongka Offline
Member

Posts: 225
Threads: 3
Joined: Nov 2010
Reputation: 20
#3
RE: Need some help with floors.

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.

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 <.<

[Image: 18694.png]
(This post was last modified: 08-24-2012, 08:43 PM by Ongka.)
08-24-2012, 08:42 PM
Find
Melvin Offline
Member

Posts: 245
Threads: 38
Joined: Jun 2012
Reputation: 5
#4
RE: Need some help with floors.

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!

[Image: 25F7U37.png]
(This post was last modified: 08-24-2012, 11:12 PM by Melvin.)
08-24-2012, 11:10 PM
Website Find
Melvin Offline
Member

Posts: 245
Threads: 38
Joined: Jun 2012
Reputation: 5
#5
RE: Need some help with floors.

(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?)

[Image: 25F7U37.png]
08-25-2012, 09:47 AM
Website Find
Adny Offline
Posting Freak

Posts: 1,766
Threads: 6
Joined: Mar 2012
Reputation: 173
#6
RE: Need some help with floors.

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.

I rate it 3 memes.
08-25-2012, 09:57 AM
Find
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#7
RE: Need some help with floors.

For custom materials with custom sounds, you need to modify materials.cfg.

Tutorials: From Noob to Pro
08-25-2012, 10:49 AM
Website Find
Adny Offline
Posting Freak

Posts: 1,766
Threads: 6
Joined: Mar 2012
Reputation: 173
#8
RE: Need some help with floors.

Called it.

I rate it 3 memes.
08-25-2012, 10:51 AM
Find




Users browsing this thread: 2 Guest(s)