Jump to content
Sign in to follow this  
Kydoimos

Adding Animation Sounds

Recommended Posts

Hi all,

 

Did a search on the forums for 'sound' and 'animation', but surprisingly it didn't actually turn up much! Basically, I've got a config entry for adding a sound and I wondered where I'm meant to put it:

sound[] = {"\Gun_Cabinet\Gun_Cabinet\Sounds\Gun_Cabinet_Close.ogg", 
10.000000, 1};

In the config viewer, I saw that buildings have sounds listed under AnimationSources - but I couldn't see separate sounds for opening and closing doors. Just looking for a bit of a guidance on the subject :) Thanks!

Share this post


Link to post
Share on other sites

been a while that i used this but should still work the same.

 

https://forums.bistudio.com/topic/167580-animation-explanation-of-the-magic-behind/?p=2631814

 

depending on situation this is not the ideal solution though since it can not coexist with other addons doing the same if i remember correctly. for climbing for example i ended up using sounds from vanilla anims. so if you just need a generic cloth/movement sound you can always pick one of the used ones in the anim config. really depends on your goals though

Share this post


Link to post
Share on other sites

Thanks matey, I'll check that out! :D

 

EDIT: In the example config, it's configured for a unit animation - any ideas how it might change for an object with an animated door? I guess I could add the sound to the animation action - but it seems a bit quick and dirty!

 

EDIT: Sorted it out now! Simply had to add the following to the AnimationSources in the config:

		class AnimationSources
		{
			class Gun_Cabinet_Rotation
			{
				source = "user";
				initPhase = 0;
				animPeriod = 1.75;
				Sound = "MetalDoorsSound";
				SoundPosition = "ActionPoint";
			}
		};

Share this post


Link to post
Share on other sites

 

Thanks matey, I'll check that out! :D

 

EDIT: In the example config, it's configured for a unit animation - any ideas how it might change for an object with an animated door? I guess I could add the sound to the animation action - but it seems a bit quick and dirty!

 

EDIT: Sorted it out now! Simply had to add the following to the AnimationSources in the config:

		class AnimationSources
		{
			class Gun_Cabinet_Rotation
			{
				source = "user";
				initPhase = 0;
				animPeriod = 1.75;
				Sound = "MetalDoorsSound";
				SoundPosition = "ActionPoint";
			}
		};

 

ooooh! that is entirely different then as you already have figured out. a lot less headache then the humanoid stuff to be honest. good for you not having to deal with that lol. very frustrating...

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×