Author Topic: Jump Sound  (Read 988 times)

I want to replace the default "jump.wav" sound with a sound of my own, but everytime in v20 when i put it in

C: - Users - (username) - My Documents - Blockland - Base - Data - Sounds , it replaces it with the default jumping sound!

Could someone help me script or give me a script that will change the default jump.wav sound?

FileCopy("path to your add-on's sound","base/data/sounds/jump.wav");

FileCopy("path to your add-on's sound","base/data/sounds/jump.wav");
That seems inefficient because then the file is re-written twice every time you start BL.

I was able to change it with this: jumpSound.fileName = "pathToFile.wav";

Could you please package a script for me, greek2me please?

Im in desprate need of a new jump sound

I used to have an epic one D:

Here it is:
http://greek2me.webs.com/Downloads/Random/Script_JumpSound.zip

You can replace the .wav file that's included in there, although I like the one I picked.

That script confuses me... what is the point of having this at the beginning?
Code: [Select]
if(isFile("./jumpSound.wav"))
jumpSound.fileName = "./jumpSound.wav";

That script confuses me... what is the point of having this at the beginning?
Code: [Select]
if(isFile("./jumpSound.wav"))
jumpSound.fileName = "./jumpSound.wav";
It's changing the file used by the jumpSound datablock that the player uses.

Yes. It's the only part of the code that's actually needed. The packaged function is only there in case the jump sound datablock is created after the mod is loaded.

Oh I see... just realized that jumpSound.fileName is referring to the in-game jump sound ;)

Thx bro. U mind if I release if on rtb?

Thx bro. U mind if I release if on rtb?
Don't release it. It's only meant as an example to show you how to change the sounds and stuff.

That seems inefficient because then the file is re-written twice every time you start BL.

I was able to change it with this: jumpSound.fileName = "pathToFile.wav";
That's server sided.

Thanks for all of your help.

Locking...