Author Topic: Footstep type question.  (Read 329 times)

Legacy_GhostOfGod

  • Hero Member
  • *****
  • Posts: 1490
  • Karma: +0/-0
Footstep type question.
« on: July 19, 2012, 01:25:42 am »


               This question has probably been answered a number of times. I just have crappy memory. I don't think there is a way but figured I'd ask anyway.

First off I know how to change a player's footstep sound via scripting with the SetFootstepType function. What I'm wondering is if there is a way to change it to one of the subtypes for a footstep type based on the terrain that you are on. IE. default footstep type: walking on wood, dirt, stone, etc...

I see the different colums in the footsepsound.2da for the different terrains and the sound that is used while on that terrain but I don't know of any particular way to "pretend" a terrain change. There is also the sufacemat.2da that contains the info for the different surfaces but not sure that will help with anything.

The reason for this is that I have some of the CEP wood placeables put down over standard cobble for a "wood docks" look. It would be nice if it could sound like the player is walking on wood also.

Thanks.
               
               

               


                     Modifié par GhostOfGod, 19 juillet 2012 - 12:37 .
                     
                  


            

Legacy_henesua

  • Hero Member
  • *****
  • Posts: 6519
  • Karma: +0/-0
Footstep type question.
« Reply #1 on: July 19, 2012, 04:34:07 am »


                I looked into trying to achieve the same thing, and found no success with changing terrain type to simulate different sounds. So instead I created a few new rows in the footstepsounds.2da which make any terrain sound like what I want it to. For example I have a carpet row which turns rock, dirt, etc... to a carpet sound. If you find another way to achieve this, I'd like to know, but so far my method is working fine.

I create a trigger that changes footstep sound on enter, and restores it on exit. A local integer on the trigger defines which footstep type to use.

aa_trg_en_carpet
aa_trg_ex_carpet

footstepsounds.2da

yes, as you can see i have not fleshed out my 2da. 
my development process is ad-hoc.  lines 21 and 22 are the important ones. nevertheless this should show you one way that you can achieve your goal.

As always, i am interested in suggestions for impovement.
               
               

               


                     Modifié par henesua, 19 juillet 2012 - 03:38 .
                     
                  


            

Legacy_GhostOfGod

  • Hero Member
  • *****
  • Posts: 1490
  • Karma: +0/-0
Footstep type question.
« Reply #2 on: July 19, 2012, 05:40:18 am »


               Ah ha. Thanks henesua. Good idea.
So I guess the main question now is, is this a 2da that the client will need to download or is this only needed on the server side?
As long as it is only needed server side it should be ok.
               
               

               


                     Modifié par GhostOfGod, 19 juillet 2012 - 04:40 .
                     
                  


            

Legacy_henesua

  • Hero Member
  • *****
  • Posts: 6519
  • Karma: +0/-0
Footstep type question.
« Reply #3 on: July 19, 2012, 05:50:55 am »


               I dunno. So far I've released all of my 2das to my players in the top hak for arnheim. I have not gotten fancy with adjusting 2das serverside.

I suspect that this is required by the client. My theory is that since scripts run on the server, if a script uses a 2da for simple data lookup then the 2da only needs to be updated on the server. however if the 2da is used to reference resources like sounds or graphics, then the client is using it to determine which resource to use.

But anyway, let me know how this works for you, if you do any experimenting.
               
               

               
            

Legacy_GhostOfGod

  • Hero Member
  • *****
  • Posts: 1490
  • Karma: +0/-0
Footstep type question.
« Reply #4 on: July 19, 2012, 05:58:46 am »


               Will do. Thanks again henesua.