|
Hi, I am currently trying to get a footsteps track to play while I move through a scene (FPS). I have seen a lot of scripts on the forums but I dont know how or where to place these - any help would be greatly appreciated as I have never done any kind of scripting, really need a step by step! Thanks Dave
(comments are locked)
|
|
This question is really quite general, but I'll try to be as specific as I can. Going through the tutorials and checking out their setups is a great way to start. I recommend checking out the 2D platformer tutorial specifically as I know that it has sound on footfalls. Their setup has the following:
It is possible that your FPS doesn't actually have a player character but a camera floating in space. In this case, you would have to decide how and when to trigger your sounds. To play audio, you can do something like:
or
You would do this whenever you move. You could do some boolean checking (as a lock) to prevent playing the sound too frequently, possibly with a coroutine to wait a specified amount of time or something to control the flag.
(comments are locked)
|

I think you'll have better luck if you ask a more specific question. As you've found, there are plenty of examples of how to do this in the forums. If you're not having any luck with those examples, perhaps you could describe what you've tried and what sort of problems you've run into. (Also, I think this might be better suited as a forum thread rather than as a Unity Answers question.)