Author Topic: Setting Footstep sounds with a trigger  (Read 427 times)

Legacy_henesua

  • Hero Member
  • *****
  • Posts: 6519
  • Karma: +0/-0
Setting Footstep sounds with a trigger
« on: March 22, 2011, 05:49:55 am »


               [original post]
I'm getting tired of these placeable rugs that don't dampen the sound of my character's footsteps.

Is it possible for a placeable rug to have a WOK mesh that alters the sound of the footsteps? if so, please point me to a tutorial that illustrates in gmax how to create a wok mesh and associate it with an MDL.

Thanks.

[where it lead]
This thread inspired me a year ago to put together triggers that alter footstep sounds. Now that I am going over Arnheim's custom content I've optimized my footstepsounds.2da and updated a pair of enter and exit scripts on a "footsteps" trigger. A builder using these resources will be able to control footstep sounds within any trigger drawn in an area.

I use this for placeable carpets, placeable floor tiles (wood, stone etc..), and tile magic.

Here are the resources:
footstepsounds.2da
aa_trg_en_carpet.nss
aa_trg_ex_carpet .nss

Or better yet get the resources from my project page.

The trigger if it is not defining carpet needs a local int
FOOTSTEP_TYPE
with value between 1 and 11 to force a footstep sound based on material as follows:
    1   dirt    2   grass    3   stone    4   wood    5   water    6   carpet    7   metal    8   puddle    9   leaves    10  sand    11  snow 
               
               

               


                     Modifié par henesua, 06 octobre 2012 - 05:33 .
                     
                  


            

Legacy_Zwerkules

  • Hero Member
  • *****
  • Posts: 1997
  • Karma: +0/-0
Setting Footstep sounds with a trigger
« Reply #1 on: March 22, 2011, 03:57:17 pm »


               The walkmeshes for placeables (pwk) only define where a pc/npc can't walk. You can't make any placeable bridges you could walk over or a house with a balcony on which you could stand.
That also means you can't make a patch of snow which causes your footsteps to sound like you are walking through snow if you walk across it. Or a patch of sand, or a crapet, etc.

The way your footsteps sound depends entirely on the walkmeshes of tiles.
So if you'd make a tile that has a carpet where you want it and set the material type of the appropriate faces of the walkmesh to 9 (carpet) you'd get the right sound if you'd walk over that carpet.
               
               

               
            

Legacy_henesua

  • Hero Member
  • *****
  • Posts: 6519
  • Karma: +0/-0
Setting Footstep sounds with a trigger
« Reply #2 on: March 22, 2011, 04:29:42 pm »


               Thanks for the reply. I had suspected the same, but saw a few references in various places to placeables and WOK meshes. This lead me to hope!

Anyway thanks.
               
               

               
            

Legacy_OldTimeRadio

  • Hero Member
  • *****
  • Posts: 2307
  • Karma: +0/-0
Setting Footstep sounds with a trigger
« Reply #3 on: March 22, 2011, 05:15:32 pm »


               You can use SetFootstepType to change the sound of the PC's footsteps as they walk across a trigger sized to the rug, though.

DEMO - SetFootstepType
               
               

               


                     Modifié par OldTimeRadio, 23 mars 2011 - 02:41 .
                     
                  


            

Legacy_Zwerkules

  • Hero Member
  • *****
  • Posts: 1997
  • Karma: +0/-0
Setting Footstep sounds with a trigger
« Reply #4 on: March 22, 2011, 06:10:57 pm »


               Thanks for pointing out that function, OldTimeRadio!
I don't know the new scripting functions added with the 1.6x patches, because I have concentrated on making new models and haven't scripted for a couple of years. But those functions will be VERY handy when I have finished the tilesets I need for my module and can actually start finish building that module (if that ever happens '<img'> ).
               
               

               
            

Legacy_henesua

  • Hero Member
  • *****
  • Posts: 6519
  • Karma: +0/-0
Setting Footstep sounds with a trigger
« Reply #5 on: March 22, 2011, 07:16:31 pm »


               Very interesting. I had not realized that such a function existed. Thanks much.
               
               

               
            

Legacy_henesua

  • Hero Member
  • *****
  • Posts: 6519
  • Karma: +0/-0
Setting Footstep sounds with a trigger
« Reply #6 on: March 23, 2011, 01:16:55 am »


               So if you create a carpet entry in the footstepsounds 2da and use that int for your footstep sound, this can work nicely. You just need to skip some creatures such as fliers and those without footstep sounds.

I suppose things to check for are unconventional ways of leaving the trigger (lagging out etc..), and making sure that they all fire exit events.
               
               

               
            

Legacy_Guest_Chrysoli_*

  • Jr. Member
  • **
  • Posts: 53
  • Karma: +0/-0
Setting Footstep sounds with a trigger
« Reply #7 on: March 23, 2011, 06:32:41 pm »


               I didn't realize this either - what a handy function! Thanks OTR
               
               

               
            

Legacy_henesua

  • Hero Member
  • *****
  • Posts: 6519
  • Karma: +0/-0
Setting Footstep sounds with a trigger
« Reply #8 on: August 22, 2012, 02:20:36 am »


               This thread inspired me a year ago to put together triggers that alter footstep sounds. Now that I am going over Arnheim's custom content I've optimized my footstepsounds.2da and updated a pair of enter and exit scripts on a "footsteps" trigger. A builder using these resources will be able to control footstep sounds within any trigger drawn in an area.

I use this for placeable carpets, placeable floor tiles (wood, stone etc..), and tile magic.

Here are the resources:
footstepsounds.2da
aa_trg_en_carpet.nss
aa_trg_ex_carpet .nss

The trigger if it is not defining carpet needs a local int
FOOTSTEP_TYPE
with value between 1 and 11 to force a footstep sound based on material as follows:
    1   dirt    2   grass    3   stone    4   wood    5   water    6   carpet    7   metal    8   puddle    9   leaves    10  sand    11  snow
               
               

               
            

Legacy_The Amethyst Dragon

  • Hero Member
  • *****
  • Posts: 2981
  • Karma: +0/-0
Setting Footstep sounds with a trigger
« Reply #9 on: August 22, 2012, 06:35:45 am »


               Thanks, henesua.  This could prove quite useful.
               
               

               
            

Legacy_Bannor Bloodfist

  • Hero Member
  • *****
  • Posts: 1578
  • Karma: +0/-0
Setting Footstep sounds with a trigger
« Reply #10 on: August 22, 2012, 08:41:13 pm »


               vote for a sticky on this one as henesua's little tools can and will prove very useful in multiple aspects.
               
               

               
            

Legacy_henesua

  • Hero Member
  • *****
  • Posts: 6519
  • Karma: +0/-0
Setting Footstep sounds with a trigger
« Reply #11 on: August 22, 2012, 08:46:25 pm »


               Maybe I should store this sort of thing in my "projects" area
               
               

               
            

Legacy_henesua

  • Hero Member
  • *****
  • Posts: 6519
  • Karma: +0/-0
Setting Footstep sounds with a trigger
« Reply #12 on: October 06, 2012, 06:32:30 pm »


               I've now put these files for altering footstep sounds in a BSN project if anyone is interested.