Step sounds how to intigrate in humanplayer.cpp

Get technical support about the C++ source code and about Lua scripts for maps, entities, GUIs, the console, materials, etc. Also covered are the Cafu libraries and APIs, as well as compiling, linking, and the build system.
Post Reply
User avatar
bigjj13
Posts:68
Joined:2010-04-04, 19:16
Location:Germany
Contact:
Step sounds how to intigrate in humanplayer.cpp

Post by bigjj13 » 2010-10-11, 15:56

Hi,

I just made some step sounds (run, walk) and made a sound shader but I dont know how to integrate it in the Game.

Here Are the files:
sounds.zip
(83.13KiB)Downloaded 360 times
Thanks
BigJJ -- SG-O
Image
User avatar
Carsten
Site Admin
Posts:2170
Joined:2004-08-19, 13:46
Location:Germany
Contact:

Re: Step sounds how to intigrate in humanplayer.cpp

Post by Carsten » 2010-10-11, 22:22

Hi BigJJ,
bigjj13 wrote:I just made some step sounds (run, walk) and made a sound shader
Ah, that's what I call a sound idea! :wman:

Well, I looked at your files, they both sound good and work fine. You can try the following in the console to verify:

Code: Select all

MusicStop()     -- Stops the currently playing music.
MusicLoad("Ambient/Footstepswalk")   -- Loads your sound.
MusicPlay()     -- Plays the previously loaded sound.
There is no need to load a level for this, just press F1 at the main menu and enter these commands.
If you repeat the MusicPlay() command (use arrow-up key...), the sound plays again, just as intended.

That test at least verifies that the sound shader is correct and properly read, and the the audio system is generally fine as well.

If it doesn't work in the game, it's probably a problem with the calling code, but that's hard to tell without any code to look at. ;)
Best regards,
Carsten
User avatar
bigjj13
Posts:68
Joined:2010-04-04, 19:16
Location:Germany
Contact:

Re: Step sounds how to intigrate in humanplayer.cpp

Post by bigjj13 » 2010-10-12, 14:54

Hi,

the sound works fine, but I dont know how your SoundSystem works.

I tried several things but there was allways a compiling error.

Sincerely
BigJJ -- SG-O
Image
User avatar
Carsten
Site Admin
Posts:2170
Joined:2004-08-19, 13:46
Location:Germany
Contact:

Re: Step sounds how to intigrate in humanplayer.cpp

Post by Carsten » 2010-10-12, 23:12

bigjj13 wrote:I tried several things but there was allways a compiling error.
Well, which errors do you get?
What code is rising them?
If you want us to help you, you must provide more details. :up:

Also, did you look at other places in the code that successfully plays sounds, such as Games/DeathMatch/Code/Item.cpp?
Best regards,
Carsten
User avatar
bigjj13
Posts:68
Joined:2010-04-04, 19:16
Location:Germany
Contact:

Re: Step sounds how to intigrate in humanplayer.cpp

Post by bigjj13 » 2010-10-13, 15:46

Hi,

you helped me very mutch. Thank you. :thanks:

Here is the patch with the sound files:
ticket#43

Thanks
BigJJ -- SG-O
Image
Post Reply

Who is online

Users browsing this forum: No registered users and 42 guests