<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.heroesofhammerwatch.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=The+Slad</id>
	<title>Heroes of Hammerwatch wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.heroesofhammerwatch.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=The+Slad"/>
	<link rel="alternate" type="text/html" href="https://wiki.heroesofhammerwatch.com/Special:Contributions/The_Slad"/>
	<updated>2026-08-09T11:30:19Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.35.14</generator>
	<entry>
		<id>https://wiki.heroesofhammerwatch.com/index.php?title=Creating_dynamic_sounds_with_FMOD&amp;diff=2404</id>
		<title>Creating dynamic sounds with FMOD</title>
		<link rel="alternate" type="text/html" href="https://wiki.heroesofhammerwatch.com/index.php?title=Creating_dynamic_sounds_with_FMOD&amp;diff=2404"/>
		<updated>2020-11-07T23:30:12Z</updated>

		<summary type="html">&lt;p&gt;The Slad: /* Adding a parameter to your sound event in FMOD */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
It is possible to create dynamic sounds and music for you mod using parameters in FMOD.&lt;br /&gt;
&lt;br /&gt;
This page assumes you already have FMOD set up for your Heroes of Hammerwatch mod. See [[Adding custom sounds and music]] for more information.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__FORCETOC__&lt;br /&gt;
&lt;br /&gt;
==Adding a parameter to your sound event in FMOD==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1. Open your event in FMOD and use the &amp;quot;+&amp;quot; tab above the tracks to add a new parameter.&lt;br /&gt;
&lt;br /&gt;
[[File:AddingFmodParameter.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2. If you haven't created the effect that you want to be dynamic, go ahead and do that now.&lt;br /&gt;
&lt;br /&gt;
NOTE: your effect must come before (on the left of) the Spatializer (the effect with 'distance attenuation') if using a 3dEvent!&lt;br /&gt;
&lt;br /&gt;
[[File:AddingFmodEffect.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. Right-click on the knob that you want to be dynamically controlled, and select &amp;quot;Add Automation&amp;quot;. Your should now see a track for that setting in the track deck.&lt;br /&gt;
&lt;br /&gt;
In the new tab for your parameter, add you desired control points to determine how the setting is changed based on the parameter. There is a scale above the tracks showing the range of your parameter, and above that is a knob for your parameter to test how different values sound.You can also set a default value by right clicking on your parameter knob.&lt;br /&gt;
&lt;br /&gt;
[[File:ParameterTabExample.png]]&lt;br /&gt;
&lt;br /&gt;
==Controlling the parameter in your mod scripts==&lt;br /&gt;
&lt;br /&gt;
You will need to use you own sValue parameter rather than the standard ones. For example: If you are creating a new projectile unit and want to have a dynamic shoot sound, do not use the &amp;quot;shoot-snd&amp;quot; parameter because this used by the base projectile classes and would be difficult to alter how it is controlled.&lt;br /&gt;
&lt;br /&gt;
BAD:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;string name=&amp;quot;shoot-snd&amp;quot;&amp;gt;{5567e7f1-bf44-420c-a7b8-fc8c1ee2f628}&amp;lt;/string&amp;gt;&lt;br /&gt;
&lt;br /&gt;
GOOD:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;string name=&amp;quot;custom-shoot-snd&amp;quot;&amp;gt;{5567e7f1-bf44-420c-a7b8-fc8c1ee2f628}&amp;lt;/string&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Continuing with the dynamic shoot sound example, you would need to have a custom projectile script that extends the desired type of projectile. Load in your sound sVal parameter, override the Initialize method, call the base class' Initialize method, then play your sound by calling PlaySound3D with a dictionary of your parameter:&lt;br /&gt;
&lt;br /&gt;
 class DynamicSoundBeam : BeamProjectile&lt;br /&gt;
 {&lt;br /&gt;
 	SoundEvent@ customShootSound;&lt;br /&gt;
 	&lt;br /&gt;
 	DynamicSoundBeam(UnitPtr unit, SValue&amp;amp; params)&lt;br /&gt;
 	{&lt;br /&gt;
 		super(unit, params);&lt;br /&gt;
 		&lt;br /&gt;
 		@customShootSound = Resources::GetSoundEvent(GetParamString(unit, params, &amp;quot;custom-shoot-snd&amp;quot;, false));&lt;br /&gt;
 	}&lt;br /&gt;
 	&lt;br /&gt;
 	void Initialize(Actor@ owner, vec2 dir, float intensity, bool husk, Actor@ target, uint weapon) override&lt;br /&gt;
 	{&lt;br /&gt;
 		BeamProjectile::Initialize(owner, dir, intensity, husk, target, weapon);&lt;br /&gt;
 &lt;br /&gt;
 		float paramValue = 0.7 // &amp;lt;---- your beautiful dynamic parameter logic here&lt;br /&gt;
 &lt;br /&gt;
 		dictionary params = { { &amp;quot;MyParameter&amp;quot;, paramValue } };&lt;br /&gt;
 		PlaySound3D(customShootSound, m_unit.GetPosition(), params);	&lt;br /&gt;
 	}&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==Controlling an on-going sound==&lt;br /&gt;
It is also possible to control an FMOD parameter while the sound is playing. Instead of using PlaySound3D, you can call PlayTracked directly on your SoundEvent which will return a SoundInstance. With a reference to the SoundInstance you can execute more control over how the sound plays out. See the [https://docs.heroesofhammerwatch.com/engine/class_sound_instance.html SoundInstance] documentation for all the options. Then you can alter the sound instance as you please in an update method:&lt;br /&gt;
&lt;br /&gt;
 class DynamicSoundBeam : BeamProjectile&lt;br /&gt;
 {&lt;br /&gt;
 	SoundEvent@ customShootSound;&lt;br /&gt;
 	SoundInstance@ = myCustomSoundInstance;&lt;br /&gt;
 	&lt;br /&gt;
 	DynamicSoundBeam(UnitPtr unit, SValue&amp;amp; params)&lt;br /&gt;
 	{&lt;br /&gt;
 		super(unit, params);&lt;br /&gt;
 		&lt;br /&gt;
 		@customShootSound = Resources::GetSoundEvent(GetParamString(unit, params, &amp;quot;custom-shoot-snd&amp;quot;, false));&lt;br /&gt;
 	}&lt;br /&gt;
 	&lt;br /&gt;
 	void Initialize(Actor@ owner, vec2 dir, float intensity, bool husk, Actor@ target, uint weapon) override&lt;br /&gt;
 	{&lt;br /&gt;
 		BeamProjectile::Initialize(owner, dir, intensity, husk, target, weapon);&lt;br /&gt;
 		&lt;br /&gt;
 		@myCustomSoundInstance = customShootSound.PlayTracked(m_unit.GetPosition());&lt;br /&gt;
 	}&lt;br /&gt;
 	&lt;br /&gt;
 	void Update(int dt) override&lt;br /&gt;
 	{&lt;br /&gt;
 		BeamProjectile::Update(dt);&lt;br /&gt;
 		&lt;br /&gt;
 		float param = 0.7 // &amp;lt;--- you got this, champ.&lt;br /&gt;
 		&lt;br /&gt;
 		myCustomSoundInstance.SetPosition(m_unit.GetPosition());&lt;br /&gt;
 		myCustomSoundInstance.SetParameter(&amp;quot;myParameter&amp;quot;, param);&lt;br /&gt;
 	{&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Template:BaseNav}}&lt;/div&gt;</summary>
		<author><name>The Slad</name></author>
	</entry>
	<entry>
		<id>https://wiki.heroesofhammerwatch.com/index.php?title=Creating_dynamic_sounds_with_FMOD&amp;diff=2403</id>
		<title>Creating dynamic sounds with FMOD</title>
		<link rel="alternate" type="text/html" href="https://wiki.heroesofhammerwatch.com/index.php?title=Creating_dynamic_sounds_with_FMOD&amp;diff=2403"/>
		<updated>2020-11-07T23:29:57Z</updated>

		<summary type="html">&lt;p&gt;The Slad: /* Adding a parameter to your sound event in FMOD */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
It is possible to create dynamic sounds and music for you mod using parameters in FMOD.&lt;br /&gt;
&lt;br /&gt;
This page assumes you already have FMOD set up for your Heroes of Hammerwatch mod. See [[Adding custom sounds and music]] for more information.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__FORCETOC__&lt;br /&gt;
&lt;br /&gt;
==Adding a parameter to your sound event in FMOD==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1. Open your event in FMOD and use the &amp;quot;+&amp;quot; tab above the tracks to add a new parameter.&lt;br /&gt;
&lt;br /&gt;
[[File:AddingFmodParameter.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2. If you haven't created the effect that you want to be dynamic, go ahead and do that now.&lt;br /&gt;
NOTE: your effect must come before (on the left of) the Spatializer (the effect with 'distance attenuation') if using a 3dEvent!&lt;br /&gt;
&lt;br /&gt;
[[File:AddingFmodEffect.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. Right-click on the knob that you want to be dynamically controlled, and select &amp;quot;Add Automation&amp;quot;. Your should now see a track for that setting in the track deck.&lt;br /&gt;
&lt;br /&gt;
In the new tab for your parameter, add you desired control points to determine how the setting is changed based on the parameter. There is a scale above the tracks showing the range of your parameter, and above that is a knob for your parameter to test how different values sound.You can also set a default value by right clicking on your parameter knob.&lt;br /&gt;
&lt;br /&gt;
[[File:ParameterTabExample.png]]&lt;br /&gt;
&lt;br /&gt;
==Controlling the parameter in your mod scripts==&lt;br /&gt;
&lt;br /&gt;
You will need to use you own sValue parameter rather than the standard ones. For example: If you are creating a new projectile unit and want to have a dynamic shoot sound, do not use the &amp;quot;shoot-snd&amp;quot; parameter because this used by the base projectile classes and would be difficult to alter how it is controlled.&lt;br /&gt;
&lt;br /&gt;
BAD:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;string name=&amp;quot;shoot-snd&amp;quot;&amp;gt;{5567e7f1-bf44-420c-a7b8-fc8c1ee2f628}&amp;lt;/string&amp;gt;&lt;br /&gt;
&lt;br /&gt;
GOOD:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;string name=&amp;quot;custom-shoot-snd&amp;quot;&amp;gt;{5567e7f1-bf44-420c-a7b8-fc8c1ee2f628}&amp;lt;/string&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Continuing with the dynamic shoot sound example, you would need to have a custom projectile script that extends the desired type of projectile. Load in your sound sVal parameter, override the Initialize method, call the base class' Initialize method, then play your sound by calling PlaySound3D with a dictionary of your parameter:&lt;br /&gt;
&lt;br /&gt;
 class DynamicSoundBeam : BeamProjectile&lt;br /&gt;
 {&lt;br /&gt;
 	SoundEvent@ customShootSound;&lt;br /&gt;
 	&lt;br /&gt;
 	DynamicSoundBeam(UnitPtr unit, SValue&amp;amp; params)&lt;br /&gt;
 	{&lt;br /&gt;
 		super(unit, params);&lt;br /&gt;
 		&lt;br /&gt;
 		@customShootSound = Resources::GetSoundEvent(GetParamString(unit, params, &amp;quot;custom-shoot-snd&amp;quot;, false));&lt;br /&gt;
 	}&lt;br /&gt;
 	&lt;br /&gt;
 	void Initialize(Actor@ owner, vec2 dir, float intensity, bool husk, Actor@ target, uint weapon) override&lt;br /&gt;
 	{&lt;br /&gt;
 		BeamProjectile::Initialize(owner, dir, intensity, husk, target, weapon);&lt;br /&gt;
 &lt;br /&gt;
 		float paramValue = 0.7 // &amp;lt;---- your beautiful dynamic parameter logic here&lt;br /&gt;
 &lt;br /&gt;
 		dictionary params = { { &amp;quot;MyParameter&amp;quot;, paramValue } };&lt;br /&gt;
 		PlaySound3D(customShootSound, m_unit.GetPosition(), params);	&lt;br /&gt;
 	}&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==Controlling an on-going sound==&lt;br /&gt;
It is also possible to control an FMOD parameter while the sound is playing. Instead of using PlaySound3D, you can call PlayTracked directly on your SoundEvent which will return a SoundInstance. With a reference to the SoundInstance you can execute more control over how the sound plays out. See the [https://docs.heroesofhammerwatch.com/engine/class_sound_instance.html SoundInstance] documentation for all the options. Then you can alter the sound instance as you please in an update method:&lt;br /&gt;
&lt;br /&gt;
 class DynamicSoundBeam : BeamProjectile&lt;br /&gt;
 {&lt;br /&gt;
 	SoundEvent@ customShootSound;&lt;br /&gt;
 	SoundInstance@ = myCustomSoundInstance;&lt;br /&gt;
 	&lt;br /&gt;
 	DynamicSoundBeam(UnitPtr unit, SValue&amp;amp; params)&lt;br /&gt;
 	{&lt;br /&gt;
 		super(unit, params);&lt;br /&gt;
 		&lt;br /&gt;
 		@customShootSound = Resources::GetSoundEvent(GetParamString(unit, params, &amp;quot;custom-shoot-snd&amp;quot;, false));&lt;br /&gt;
 	}&lt;br /&gt;
 	&lt;br /&gt;
 	void Initialize(Actor@ owner, vec2 dir, float intensity, bool husk, Actor@ target, uint weapon) override&lt;br /&gt;
 	{&lt;br /&gt;
 		BeamProjectile::Initialize(owner, dir, intensity, husk, target, weapon);&lt;br /&gt;
 		&lt;br /&gt;
 		@myCustomSoundInstance = customShootSound.PlayTracked(m_unit.GetPosition());&lt;br /&gt;
 	}&lt;br /&gt;
 	&lt;br /&gt;
 	void Update(int dt) override&lt;br /&gt;
 	{&lt;br /&gt;
 		BeamProjectile::Update(dt);&lt;br /&gt;
 		&lt;br /&gt;
 		float param = 0.7 // &amp;lt;--- you got this, champ.&lt;br /&gt;
 		&lt;br /&gt;
 		myCustomSoundInstance.SetPosition(m_unit.GetPosition());&lt;br /&gt;
 		myCustomSoundInstance.SetParameter(&amp;quot;myParameter&amp;quot;, param);&lt;br /&gt;
 	{&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Template:BaseNav}}&lt;/div&gt;</summary>
		<author><name>The Slad</name></author>
	</entry>
	<entry>
		<id>https://wiki.heroesofhammerwatch.com/index.php?title=Creating_dynamic_sounds_with_FMOD&amp;diff=2402</id>
		<title>Creating dynamic sounds with FMOD</title>
		<link rel="alternate" type="text/html" href="https://wiki.heroesofhammerwatch.com/index.php?title=Creating_dynamic_sounds_with_FMOD&amp;diff=2402"/>
		<updated>2020-11-07T14:34:40Z</updated>

		<summary type="html">&lt;p&gt;The Slad: removed superfluous line of code.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
It is possible to create dynamic sounds and music for you mod using parameters in FMOD.&lt;br /&gt;
&lt;br /&gt;
This page assumes you already have FMOD set up for your Heroes of Hammerwatch mod. See [[Adding custom sounds and music]] for more information.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__FORCETOC__&lt;br /&gt;
&lt;br /&gt;
==Adding a parameter to your sound event in FMOD==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1. Open your event in FMOD and use the &amp;quot;+&amp;quot; tab above the tracks to add a new parameter.&lt;br /&gt;
&lt;br /&gt;
[[File:AddingFmodParameter.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2. If you haven't created the effect that you want to be dynamic, go ahead and do that now.&lt;br /&gt;
&lt;br /&gt;
[[File:AddingFmodEffect.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. Right-click on the knob that you want to be dynamically controlled, and select &amp;quot;Add Automation&amp;quot;. Your should now see a track for that setting in the track deck.&lt;br /&gt;
&lt;br /&gt;
In the new tab for your parameter, add you desired control points to determine how the setting is changed based on the parameter. There is a scale above the tracks showing the range of your parameter, and above that is a knob for your parameter to test how different values sound.You can also set a default value by right clicking on your parameter knob.&lt;br /&gt;
&lt;br /&gt;
[[File:ParameterTabExample.png]]&lt;br /&gt;
&lt;br /&gt;
==Controlling the parameter in your mod scripts==&lt;br /&gt;
&lt;br /&gt;
You will need to use you own sValue parameter rather than the standard ones. For example: If you are creating a new projectile unit and want to have a dynamic shoot sound, do not use the &amp;quot;shoot-snd&amp;quot; parameter because this used by the base projectile classes and would be difficult to alter how it is controlled.&lt;br /&gt;
&lt;br /&gt;
BAD:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;string name=&amp;quot;shoot-snd&amp;quot;&amp;gt;{5567e7f1-bf44-420c-a7b8-fc8c1ee2f628}&amp;lt;/string&amp;gt;&lt;br /&gt;
&lt;br /&gt;
GOOD:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;string name=&amp;quot;custom-shoot-snd&amp;quot;&amp;gt;{5567e7f1-bf44-420c-a7b8-fc8c1ee2f628}&amp;lt;/string&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Continuing with the dynamic shoot sound example, you would need to have a custom projectile script that extends the desired type of projectile. Load in your sound sVal parameter, override the Initialize method, call the base class' Initialize method, then play your sound by calling PlaySound3D with a dictionary of your parameter:&lt;br /&gt;
&lt;br /&gt;
 class DynamicSoundBeam : BeamProjectile&lt;br /&gt;
 {&lt;br /&gt;
 	SoundEvent@ customShootSound;&lt;br /&gt;
 	&lt;br /&gt;
 	DynamicSoundBeam(UnitPtr unit, SValue&amp;amp; params)&lt;br /&gt;
 	{&lt;br /&gt;
 		super(unit, params);&lt;br /&gt;
 		&lt;br /&gt;
 		@customShootSound = Resources::GetSoundEvent(GetParamString(unit, params, &amp;quot;custom-shoot-snd&amp;quot;, false));&lt;br /&gt;
 	}&lt;br /&gt;
 	&lt;br /&gt;
 	void Initialize(Actor@ owner, vec2 dir, float intensity, bool husk, Actor@ target, uint weapon) override&lt;br /&gt;
 	{&lt;br /&gt;
 		BeamProjectile::Initialize(owner, dir, intensity, husk, target, weapon);&lt;br /&gt;
 &lt;br /&gt;
 		float paramValue = 0.7 // &amp;lt;---- your beautiful dynamic parameter logic here&lt;br /&gt;
 &lt;br /&gt;
 		dictionary params = { { &amp;quot;MyParameter&amp;quot;, paramValue } };&lt;br /&gt;
 		PlaySound3D(customShootSound, m_unit.GetPosition(), params);	&lt;br /&gt;
 	}&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==Controlling an on-going sound==&lt;br /&gt;
It is also possible to control an FMOD parameter while the sound is playing. Instead of using PlaySound3D, you can call PlayTracked directly on your SoundEvent which will return a SoundInstance. With a reference to the SoundInstance you can execute more control over how the sound plays out. See the [https://docs.heroesofhammerwatch.com/engine/class_sound_instance.html SoundInstance] documentation for all the options. Then you can alter the sound instance as you please in an update method:&lt;br /&gt;
&lt;br /&gt;
 class DynamicSoundBeam : BeamProjectile&lt;br /&gt;
 {&lt;br /&gt;
 	SoundEvent@ customShootSound;&lt;br /&gt;
 	SoundInstance@ = myCustomSoundInstance;&lt;br /&gt;
 	&lt;br /&gt;
 	DynamicSoundBeam(UnitPtr unit, SValue&amp;amp; params)&lt;br /&gt;
 	{&lt;br /&gt;
 		super(unit, params);&lt;br /&gt;
 		&lt;br /&gt;
 		@customShootSound = Resources::GetSoundEvent(GetParamString(unit, params, &amp;quot;custom-shoot-snd&amp;quot;, false));&lt;br /&gt;
 	}&lt;br /&gt;
 	&lt;br /&gt;
 	void Initialize(Actor@ owner, vec2 dir, float intensity, bool husk, Actor@ target, uint weapon) override&lt;br /&gt;
 	{&lt;br /&gt;
 		BeamProjectile::Initialize(owner, dir, intensity, husk, target, weapon);&lt;br /&gt;
 		&lt;br /&gt;
 		@myCustomSoundInstance = customShootSound.PlayTracked(m_unit.GetPosition());&lt;br /&gt;
 	}&lt;br /&gt;
 	&lt;br /&gt;
 	void Update(int dt) override&lt;br /&gt;
 	{&lt;br /&gt;
 		BeamProjectile::Update(dt);&lt;br /&gt;
 		&lt;br /&gt;
 		float param = 0.7 // &amp;lt;--- you got this, champ.&lt;br /&gt;
 		&lt;br /&gt;
 		myCustomSoundInstance.SetPosition(m_unit.GetPosition());&lt;br /&gt;
 		myCustomSoundInstance.SetParameter(&amp;quot;myParameter&amp;quot;, param);&lt;br /&gt;
 	{&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Template:BaseNav}}&lt;/div&gt;</summary>
		<author><name>The Slad</name></author>
	</entry>
	<entry>
		<id>https://wiki.heroesofhammerwatch.com/index.php?title=Creating_dynamic_sounds_with_FMOD&amp;diff=2400</id>
		<title>Creating dynamic sounds with FMOD</title>
		<link rel="alternate" type="text/html" href="https://wiki.heroesofhammerwatch.com/index.php?title=Creating_dynamic_sounds_with_FMOD&amp;diff=2400"/>
		<updated>2020-11-07T04:49:43Z</updated>

		<summary type="html">&lt;p&gt;The Slad: /* Controlling the parameter in your mod scripts */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;It is possible to create dynamic sounds and music for you mod using parameters in FMOD.&lt;br /&gt;
&lt;br /&gt;
This page assumes you already have FMOD set up for your Heroes of Hammerwatch mod. See [[Adding custom sounds and music]] for more information.&lt;br /&gt;
&lt;br /&gt;
==Adding a parameter to your sound event in FMOD==&lt;br /&gt;
Open your event in FMOD and use the &amp;quot;+&amp;quot; tab above the tracks to add a new parameter.&lt;br /&gt;
&lt;br /&gt;
[[File:AddingFmodParameter.png]]&lt;br /&gt;
&lt;br /&gt;
If you haven't created the effect that you want to be dynamic, go ahead and do that now.&lt;br /&gt;
&lt;br /&gt;
[[File:AddingFmodEffect.png]]&lt;br /&gt;
&lt;br /&gt;
Right-click on the knob that you want to be dynamically controlled, and select &amp;quot;Add Automation&amp;quot;. Your should now see a track for that setting in the track deck.&lt;br /&gt;
&lt;br /&gt;
In the new tab for your parameter, add you desired control points to determine how the setting is changed based on the parameter. There is a scale above the tracks showing the range of your parameter, and above that is a knob for your parameter to test how different values sound. you can also set a default value by right clicking on your parameter knob.&lt;br /&gt;
&lt;br /&gt;
[[File:ParameterTabExample.png]]&lt;br /&gt;
&lt;br /&gt;
==Controlling the parameter in your mod scripts==&lt;br /&gt;
&lt;br /&gt;
You will need to use you own sValue parameter rather than the standard ones. For example: If you are creating a new projectile unit and want to have a dynamic shoot sound, do not use the &amp;quot;shoot-snd&amp;quot; parameter because this used by the base projectile classes and would be difficult to alter how it is controlled.&lt;br /&gt;
&lt;br /&gt;
BAD:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;string name=&amp;quot;shoot-snd&amp;quot;&amp;gt;{5567e7f1-bf44-420c-a7b8-fc8c1ee2f628}&amp;lt;/string&amp;gt;&lt;br /&gt;
&lt;br /&gt;
GOOD:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;string name=&amp;quot;custom-shoot-snd&amp;quot;&amp;gt;{5567e7f1-bf44-420c-a7b8-fc8c1ee2f628}&amp;lt;/string&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Continuing with the dynamic shoot sound example, you would need to have a custom projectile script that extends the desired type of projectile. Load in your sound sVal parameter, override the Initialize method, call the base class' Initialize method, then play your sound by calling PlaySound3D with a dictionary of your parameter:&lt;br /&gt;
&lt;br /&gt;
 class DynamicSoundBeam : BeamProjectile&lt;br /&gt;
 {&lt;br /&gt;
 	SoundEvent@ customShootSound;&lt;br /&gt;
 	&lt;br /&gt;
 	DynamicSoundBeam(UnitPtr unit, SValue&amp;amp; params)&lt;br /&gt;
 	{&lt;br /&gt;
 		super(unit, params);&lt;br /&gt;
 		&lt;br /&gt;
 		@customShootSound = Resources::GetSoundEvent(GetParamString(unit, params, &amp;quot;custom-shoot-snd&amp;quot;, false));&lt;br /&gt;
 	}&lt;br /&gt;
 	&lt;br /&gt;
 	void Initialize(Actor@ owner, vec2 dir, float intensity, bool husk, Actor@ target, uint weapon) override&lt;br /&gt;
 	{&lt;br /&gt;
 		BeamProjectile::Initialize(owner, dir, intensity, husk, target, weapon);&lt;br /&gt;
 		&lt;br /&gt;
 		m_pos = xy(m_unit.GetPosition());&lt;br /&gt;
 &lt;br /&gt;
 		float paramValue = 0.7 // &amp;lt;---- your beautiful dynamic parameter logic here&lt;br /&gt;
 &lt;br /&gt;
 		dictionary params = { { &amp;quot;MyParameter&amp;quot;, paramValue } };&lt;br /&gt;
 		PlaySound3D(customShootSound, m_unit.GetPosition(), params);	&lt;br /&gt;
 	}&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==Controlling an on-going sound==&lt;br /&gt;
It is also possible to control an FMOD parameter while the sound is playing. Instead of using PlaySound3D, you can call PlayTracked directly on your SoundEvent which will return a SoundInstance. With a reference to the SoundInstance you can execute more control over how the sound plays out. See the [https://docs.heroesofhammerwatch.com/engine/class_sound_instance.html SoundInstance] documentation for all the options. Then you can alter the sound instance as you please in an update method:&lt;br /&gt;
&lt;br /&gt;
 class DynamicSoundBeam : BeamProjectile&lt;br /&gt;
 {&lt;br /&gt;
 	SoundEvent@ customShootSound;&lt;br /&gt;
 	SoundInstance@ = myCustomSoundInstance;&lt;br /&gt;
 	&lt;br /&gt;
 	DynamicSoundBeam(UnitPtr unit, SValue&amp;amp; params)&lt;br /&gt;
 	{&lt;br /&gt;
 		super(unit, params);&lt;br /&gt;
 		&lt;br /&gt;
 		@customShootSound = Resources::GetSoundEvent(GetParamString(unit, params, &amp;quot;custom-shoot-snd&amp;quot;, false));&lt;br /&gt;
 	}&lt;br /&gt;
 	&lt;br /&gt;
 	void Initialize(Actor@ owner, vec2 dir, float intensity, bool husk, Actor@ target, uint weapon) override&lt;br /&gt;
 	{&lt;br /&gt;
 		BeamProjectile::Initialize(owner, dir, intensity, husk, target, weapon);&lt;br /&gt;
 		&lt;br /&gt;
 		@myCustomSoundInstance = customShootSound.PlayTracked(m_unit.GetPosition());&lt;br /&gt;
 	}&lt;br /&gt;
 	&lt;br /&gt;
 	void Update(int dt) override&lt;br /&gt;
 	{&lt;br /&gt;
 		BeamProjectile::Update(dt);&lt;br /&gt;
 		&lt;br /&gt;
 		float param = 0.7 // &amp;lt;--- you got this, champ.&lt;br /&gt;
 		&lt;br /&gt;
 		myCustomSoundInstance.SetPosition(m_unit.GetPosition());&lt;br /&gt;
 		myCustomSoundInstance.SetParameter(&amp;quot;myParameter&amp;quot;, param);&lt;br /&gt;
 	{&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Template:BaseNav}}&lt;/div&gt;</summary>
		<author><name>The Slad</name></author>
	</entry>
	<entry>
		<id>https://wiki.heroesofhammerwatch.com/index.php?title=Creating_dynamic_sounds_with_FMOD&amp;diff=2399</id>
		<title>Creating dynamic sounds with FMOD</title>
		<link rel="alternate" type="text/html" href="https://wiki.heroesofhammerwatch.com/index.php?title=Creating_dynamic_sounds_with_FMOD&amp;diff=2399"/>
		<updated>2020-11-07T04:46:06Z</updated>

		<summary type="html">&lt;p&gt;The Slad: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;It is possible to create dynamic sounds and music for you mod using parameters in FMOD.&lt;br /&gt;
&lt;br /&gt;
This page assumes you already have FMOD set up for your Heroes of Hammerwatch mod. See [[Adding custom sounds and music]] for more information.&lt;br /&gt;
&lt;br /&gt;
==Adding a parameter to your sound event in FMOD==&lt;br /&gt;
Open your event in FMOD and use the &amp;quot;+&amp;quot; tab above the tracks to add a new parameter.&lt;br /&gt;
&lt;br /&gt;
[[File:AddingFmodParameter.png]]&lt;br /&gt;
&lt;br /&gt;
If you haven't created the effect that you want to be dynamic, go ahead and do that now.&lt;br /&gt;
&lt;br /&gt;
[[File:AddingFmodEffect.png]]&lt;br /&gt;
&lt;br /&gt;
Right-click on the knob that you want to be dynamically controlled, and select &amp;quot;Add Automation&amp;quot;. Your should now see a track for that setting in the track deck.&lt;br /&gt;
&lt;br /&gt;
In the new tab for your parameter, add you desired control points to determine how the setting is changed based on the parameter. There is a scale above the tracks showing the range of your parameter, and above that is a knob for your parameter to test how different values sound. you can also set a default value by right clicking on your parameter knob.&lt;br /&gt;
&lt;br /&gt;
[[File:ParameterTabExample.png]]&lt;br /&gt;
&lt;br /&gt;
==Controlling the parameter in your mod scripts==&lt;br /&gt;
&lt;br /&gt;
You will need to use you own sValue parameter rather than the standard ones. For example: If you want to have a dynamic shoot sound, do not use the &amp;quot;shoot-snd&amp;quot; parameter because this used by the base projectile classes and would be difficult to alter how it is controlled.&lt;br /&gt;
&lt;br /&gt;
BAD:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;string name=&amp;quot;shoot-snd&amp;quot;&amp;gt;{5567e7f1-bf44-420c-a7b8-fc8c1ee2f628}&amp;lt;/string&amp;gt;&lt;br /&gt;
&lt;br /&gt;
GOOD:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;string name=&amp;quot;custom-shoot-snd&amp;quot;&amp;gt;{5567e7f1-bf44-420c-a7b8-fc8c1ee2f628}&amp;lt;/string&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Continuing with the dynamic shoot sound example, you would need to have a custom projectile script that extends the desired type of projectile. Load in your sound sVal parameter, override the Initialize method, call the base class' Initialize method, then play your sound by calling PlaySound3D with a dictionary of your parameter:&lt;br /&gt;
&lt;br /&gt;
 class DynamicSoundBeam : BeamProjectile&lt;br /&gt;
 {&lt;br /&gt;
 	SoundEvent@ customShootSound;&lt;br /&gt;
 	&lt;br /&gt;
 	DynamicSoundBeam(UnitPtr unit, SValue&amp;amp; params)&lt;br /&gt;
 	{&lt;br /&gt;
 		super(unit, params);&lt;br /&gt;
 		&lt;br /&gt;
 		@customShootSound = Resources::GetSoundEvent(GetParamString(unit, params, &amp;quot;custom-shoot-snd&amp;quot;, false));&lt;br /&gt;
 	}&lt;br /&gt;
 	&lt;br /&gt;
 	void Initialize(Actor@ owner, vec2 dir, float intensity, bool husk, Actor@ target, uint weapon) override&lt;br /&gt;
 	{&lt;br /&gt;
 		BeamProjectile::Initialize(owner, dir, intensity, husk, target, weapon);&lt;br /&gt;
 		&lt;br /&gt;
 		m_pos = xy(m_unit.GetPosition());&lt;br /&gt;
 &lt;br /&gt;
 		float paramValue = 0.7 // &amp;lt;---- your beautiful dynamic parameter logic here&lt;br /&gt;
 &lt;br /&gt;
 		dictionary params = { { &amp;quot;MyParameter&amp;quot;, paramValue } };&lt;br /&gt;
 		PlaySound3D(customShootSound, m_unit.GetPosition(), params);	&lt;br /&gt;
 	}&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==Controlling an on-going sound==&lt;br /&gt;
It is also possible to control an FMOD parameter while the sound is playing. Instead of using PlaySound3D, you can call PlayTracked directly on your SoundEvent which will return a SoundInstance. With a reference to the SoundInstance you can execute more control over how the sound plays out. See the [https://docs.heroesofhammerwatch.com/engine/class_sound_instance.html SoundInstance] documentation for all the options. Then you can alter the sound instance as you please in an update method:&lt;br /&gt;
&lt;br /&gt;
 class DynamicSoundBeam : BeamProjectile&lt;br /&gt;
 {&lt;br /&gt;
 	SoundEvent@ customShootSound;&lt;br /&gt;
 	SoundInstance@ = myCustomSoundInstance;&lt;br /&gt;
 	&lt;br /&gt;
 	DynamicSoundBeam(UnitPtr unit, SValue&amp;amp; params)&lt;br /&gt;
 	{&lt;br /&gt;
 		super(unit, params);&lt;br /&gt;
 		&lt;br /&gt;
 		@customShootSound = Resources::GetSoundEvent(GetParamString(unit, params, &amp;quot;custom-shoot-snd&amp;quot;, false));&lt;br /&gt;
 	}&lt;br /&gt;
 	&lt;br /&gt;
 	void Initialize(Actor@ owner, vec2 dir, float intensity, bool husk, Actor@ target, uint weapon) override&lt;br /&gt;
 	{&lt;br /&gt;
 		BeamProjectile::Initialize(owner, dir, intensity, husk, target, weapon);&lt;br /&gt;
 		&lt;br /&gt;
 		@myCustomSoundInstance = customShootSound.PlayTracked(m_unit.GetPosition());&lt;br /&gt;
 	}&lt;br /&gt;
 	&lt;br /&gt;
 	void Update(int dt) override&lt;br /&gt;
 	{&lt;br /&gt;
 		BeamProjectile::Update(dt);&lt;br /&gt;
 		&lt;br /&gt;
 		float param = 0.7 // &amp;lt;--- you got this, champ.&lt;br /&gt;
 		&lt;br /&gt;
 		myCustomSoundInstance.SetPosition(m_unit.GetPosition());&lt;br /&gt;
 		myCustomSoundInstance.SetParameter(&amp;quot;myParameter&amp;quot;, param);&lt;br /&gt;
 	{&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Template:BaseNav}}&lt;/div&gt;</summary>
		<author><name>The Slad</name></author>
	</entry>
	<entry>
		<id>https://wiki.heroesofhammerwatch.com/index.php?title=Creating_dynamic_sounds_with_FMOD&amp;diff=2398</id>
		<title>Creating dynamic sounds with FMOD</title>
		<link rel="alternate" type="text/html" href="https://wiki.heroesofhammerwatch.com/index.php?title=Creating_dynamic_sounds_with_FMOD&amp;diff=2398"/>
		<updated>2020-11-07T04:45:43Z</updated>

		<summary type="html">&lt;p&gt;The Slad: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;It is possible to create dynamic sounds and music for you mod using parameters in FMOD.&lt;br /&gt;
&lt;br /&gt;
This page assumes you already have FMOD set up for your Heroes of Hammerwatch mod. See [[Adding custom sounds and music]] for more information.&lt;br /&gt;
&lt;br /&gt;
==Adding a parameter to your sound event in FMOD==&lt;br /&gt;
Open your event in FMOD use the &amp;quot;+&amp;quot; tab above the tracks to add a new parameter.&lt;br /&gt;
&lt;br /&gt;
[[File:AddingFmodParameter.png]]&lt;br /&gt;
&lt;br /&gt;
If you haven't created the effect that you want to be dynamic, go ahead and do that now.&lt;br /&gt;
&lt;br /&gt;
[[File:AddingFmodEffect.png]]&lt;br /&gt;
&lt;br /&gt;
Right-click on the knob that you want to be dynamically controlled, and select &amp;quot;Add Automation&amp;quot;. Your should now see a track for that setting in the track deck.&lt;br /&gt;
&lt;br /&gt;
In the new tab for your parameter, add you desired control points to determine how the setting is changed based on the parameter. There is a scale above the tracks showing the range of your parameter, and above that is a knob for your parameter to test how different values sound. you can also set a default value by right clicking on your parameter knob.&lt;br /&gt;
&lt;br /&gt;
[[File:ParameterTabExample.png]]&lt;br /&gt;
&lt;br /&gt;
==Controlling the parameter in your mod scripts==&lt;br /&gt;
&lt;br /&gt;
You will need to use you own sValue parameter rather than the standard ones. For example: If you want to have a dynamic shoot sound, do not use the &amp;quot;shoot-snd&amp;quot; parameter because this used by the base projectile classes and would be difficult to alter how it is controlled.&lt;br /&gt;
&lt;br /&gt;
BAD:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;string name=&amp;quot;shoot-snd&amp;quot;&amp;gt;{5567e7f1-bf44-420c-a7b8-fc8c1ee2f628}&amp;lt;/string&amp;gt;&lt;br /&gt;
&lt;br /&gt;
GOOD:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;string name=&amp;quot;custom-shoot-snd&amp;quot;&amp;gt;{5567e7f1-bf44-420c-a7b8-fc8c1ee2f628}&amp;lt;/string&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Continuing with the dynamic shoot sound example, you would need to have a custom projectile script that extends the desired type of projectile. Load in your sound sVal parameter, override the Initialize method, call the base class' Initialize method, then play your sound by calling PlaySound3D with a dictionary of your parameter:&lt;br /&gt;
&lt;br /&gt;
 class DynamicSoundBeam : BeamProjectile&lt;br /&gt;
 {&lt;br /&gt;
 	SoundEvent@ customShootSound;&lt;br /&gt;
 	&lt;br /&gt;
 	DynamicSoundBeam(UnitPtr unit, SValue&amp;amp; params)&lt;br /&gt;
 	{&lt;br /&gt;
 		super(unit, params);&lt;br /&gt;
 		&lt;br /&gt;
 		@customShootSound = Resources::GetSoundEvent(GetParamString(unit, params, &amp;quot;custom-shoot-snd&amp;quot;, false));&lt;br /&gt;
 	}&lt;br /&gt;
 	&lt;br /&gt;
 	void Initialize(Actor@ owner, vec2 dir, float intensity, bool husk, Actor@ target, uint weapon) override&lt;br /&gt;
 	{&lt;br /&gt;
 		BeamProjectile::Initialize(owner, dir, intensity, husk, target, weapon);&lt;br /&gt;
 		&lt;br /&gt;
 		m_pos = xy(m_unit.GetPosition());&lt;br /&gt;
 &lt;br /&gt;
 		float paramValue = 0.7 // &amp;lt;---- your beautiful dynamic parameter logic here&lt;br /&gt;
 &lt;br /&gt;
 		dictionary params = { { &amp;quot;MyParameter&amp;quot;, paramValue } };&lt;br /&gt;
 		PlaySound3D(customShootSound, m_unit.GetPosition(), params);	&lt;br /&gt;
 	}&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==Controlling an on-going sound==&lt;br /&gt;
It is also possible to control an FMOD parameter while the sound is playing. Instead of using PlaySound3D, you can call PlayTracked directly on your SoundEvent which will return a SoundInstance. With a reference to the SoundInstance you can execute more control over how the sound plays out. See the [https://docs.heroesofhammerwatch.com/engine/class_sound_instance.html SoundInstance] documentation for all the options. Then you can alter the sound instance as you please in an update method:&lt;br /&gt;
&lt;br /&gt;
 class DynamicSoundBeam : BeamProjectile&lt;br /&gt;
 {&lt;br /&gt;
 	SoundEvent@ customShootSound;&lt;br /&gt;
 	SoundInstance@ = myCustomSoundInstance;&lt;br /&gt;
 	&lt;br /&gt;
 	DynamicSoundBeam(UnitPtr unit, SValue&amp;amp; params)&lt;br /&gt;
 	{&lt;br /&gt;
 		super(unit, params);&lt;br /&gt;
 		&lt;br /&gt;
 		@customShootSound = Resources::GetSoundEvent(GetParamString(unit, params, &amp;quot;custom-shoot-snd&amp;quot;, false));&lt;br /&gt;
 	}&lt;br /&gt;
 	&lt;br /&gt;
 	void Initialize(Actor@ owner, vec2 dir, float intensity, bool husk, Actor@ target, uint weapon) override&lt;br /&gt;
 	{&lt;br /&gt;
 		BeamProjectile::Initialize(owner, dir, intensity, husk, target, weapon);&lt;br /&gt;
 		&lt;br /&gt;
 		@myCustomSoundInstance = customShootSound.PlayTracked(m_unit.GetPosition());&lt;br /&gt;
 	}&lt;br /&gt;
 	&lt;br /&gt;
 	void Update(int dt) override&lt;br /&gt;
 	{&lt;br /&gt;
 		BeamProjectile::Update(dt);&lt;br /&gt;
 		&lt;br /&gt;
 		float param = 0.7 // &amp;lt;--- you got this, champ.&lt;br /&gt;
 		&lt;br /&gt;
 		myCustomSoundInstance.SetPosition(m_unit.GetPosition());&lt;br /&gt;
 		myCustomSoundInstance.SetParameter(&amp;quot;myParameter&amp;quot;, param);&lt;br /&gt;
 	{&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Template:BaseNav}}&lt;/div&gt;</summary>
		<author><name>The Slad</name></author>
	</entry>
	<entry>
		<id>https://wiki.heroesofhammerwatch.com/index.php?title=Adding_custom_sounds_and_music&amp;diff=2397</id>
		<title>Adding custom sounds and music</title>
		<link rel="alternate" type="text/html" href="https://wiki.heroesofhammerwatch.com/index.php?title=Adding_custom_sounds_and_music&amp;diff=2397"/>
		<updated>2020-11-07T04:42:26Z</updated>

		<summary type="html">&lt;p&gt;The Slad: /* Alternatively - use Fmod */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Adding in custom sounds and music to your scenarios requires the usage of '''.sbnk''' files. While your computer likely doesn't recognize this file type, it is really a glorified text file and can be opened with any simple text editor, such as [https://notepad-plus-plus.org/ Notepad++].&lt;br /&gt;
&lt;br /&gt;
The sound files themselves must be presented in any of the following formats: '''.wav, .ogg, .mp3, .mod, .it, .s3d, .xm'''. Each file format has its own benefits: .ogg files are relatively small, at the cost of some audio quality, while .wav files will take up more space but with good amount of quality. In the end, it is recommended to use .ogg for music, and .wav for sounds. An audio editing program such as [http://www.audacityteam.org/ Audacity] can convert most common audio filetypes into most of these formats.&lt;br /&gt;
&lt;br /&gt;
You can also use Fmod Studio to build your soundbank, that way you're not limited to the features of text-file sbnk files. This also allows you to add dynamic music, and add other kinds of effects to your sounds. See further in this article for more information.&lt;br /&gt;
&lt;br /&gt;
== Exporting sound files to .ogg ==&lt;br /&gt;
If your sound file is not already in any of the supported file formats, follow these steps to do so. Using ''Audacity'', drag the sound file of your choice into the gray area. If successful, you will see the audio channel appear. You may now edit the sound file if you wish, otherwise, click the &amp;quot;File&amp;quot; tab and then the &amp;quot;Export&amp;quot; button. Select the file type you wish to use and export it to anywhere in your scenario folder, preferablly a dedicated folder called &amp;quot;sound&amp;quot;. Continue to do this for all the sound files you need.&lt;br /&gt;
&lt;br /&gt;
== Creating the .sbnk file ==&lt;br /&gt;
With your sound files ready, you must now create an .sbnk file at which you can configure some parameters. Simply open a text editor like Notepad++, then copy this example code &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;soundbank&amp;gt;&lt;br /&gt;
  &amp;lt;sound category=&amp;quot;sfx&amp;quot; name=&amp;quot;healgun_loop&amp;quot; volume=&amp;quot;1&amp;quot; is3d=&amp;quot;true&amp;quot; looping=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;source res=&amp;quot;sounds/healgun.wav&amp;quot; /&amp;gt;&lt;br /&gt;
  &amp;lt;/sound&amp;gt;&lt;br /&gt;
&amp;lt;/soundbank&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can edit the following parameters:&lt;br /&gt;
*''name'': The name that the sound will appear in while using the editor.&lt;br /&gt;
*''volume'': The volume of the sound file. 1 is the standard volume, but you can only make it quieter.&lt;br /&gt;
*''is3d'': boolean. If set to true, the sound will only play in an area around the PlaySound WorldScript that it is assigned to. If false, it will play across the entire level.&lt;br /&gt;
*''looping'': boolean. If set to true, the sound file will keep playing everytime it finishes. If false, it will only play once.&lt;br /&gt;
If you wish to add in more sound files, simply copy and paste the &amp;lt;sound&amp;gt; parameters and edit them accordingly. You can use as many as needed.&lt;br /&gt;
When done, save the file as .sbnk.&lt;br /&gt;
&lt;br /&gt;
== Using the sound files in the editor ==&lt;br /&gt;
Open up a level, and navigate to the WorldScripts tab. Spawn in a PlaySound WorldScript. Select it, then in the &amp;quot;Sound&amp;quot; parameter, type in the name of your .sbnk file, or the name you gave the sound, and it will show up. You can do the same for the PlayMusic WorldScript.&lt;br /&gt;
&lt;br /&gt;
== Alternatively - use Fmod ==&lt;br /&gt;
The game uses Fmod internally to do all of its sounds. These kinds of sound effects start with the &amp;lt;code&amp;gt;event:/&amp;lt;/code&amp;gt; prefix instead of directly pointing to an .sbnk file. They are therefore found within a .bank file instead. It is possible to create your own Fmod Studio soundbanks for your scenarios.&lt;br /&gt;
&lt;br /&gt;
Download Fmod Studio 1.10.8 from [http://www.fmod.org/download/ this page]. Then, download [http://www.heroesofhammerwatch.com/hoh_fmod_project.zip this Fmod skeleton project] to get your started. The reason this skeleton project is needed is because your settings must match ours exactly, which is what this does. &lt;br /&gt;
&lt;br /&gt;
You will need to remove all the existing events and assets and create an additional mod_bank bank &lt;br /&gt;
Add your events to your mod_bank. Export this and you'll be able to reference events from your bank in game using their GUID (which you can get in fmod by right clicking and event and picking Copy GUID)&lt;br /&gt;
&lt;br /&gt;
for example: &amp;lt;pre&amp;gt; &amp;lt;string name=&amp;quot;Music&amp;quot;&amp;gt;{a78f74fa-fd1b-417d-a598-41c94e552470}&amp;lt;/string&amp;gt; &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If using Fmod, you can dynamically control the sounds using parameters in your scripts. See [[Creating dynamic sounds with FMOD]] for more info.&lt;br /&gt;
&lt;br /&gt;
{{Template:BaseNav}}&lt;/div&gt;</summary>
		<author><name>The Slad</name></author>
	</entry>
	<entry>
		<id>https://wiki.heroesofhammerwatch.com/index.php?title=Creating_dynamic_sounds_with_FMOD&amp;diff=2396</id>
		<title>Creating dynamic sounds with FMOD</title>
		<link rel="alternate" type="text/html" href="https://wiki.heroesofhammerwatch.com/index.php?title=Creating_dynamic_sounds_with_FMOD&amp;diff=2396"/>
		<updated>2020-11-07T04:40:25Z</updated>

		<summary type="html">&lt;p&gt;The Slad: /* Controlling an on-going sound */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;It is possible to create dynamic sounds and music for you mod using parameters in FMOD.&lt;br /&gt;
&lt;br /&gt;
This page assumes you already have FMOD set up for you Heroes of Hammerwatch mod. See [[Adding custom sounds and music]] for more information.&lt;br /&gt;
&lt;br /&gt;
==Adding a parameter to your sound event in FMOD==&lt;br /&gt;
Open your event in FMOD use the &amp;quot;+&amp;quot; tab above the tracks to add a new parameter.&lt;br /&gt;
&lt;br /&gt;
[[File:AddingFmodParameter.png]]&lt;br /&gt;
&lt;br /&gt;
If you haven't created the effect that you want to be dynamic, go ahead and do that now.&lt;br /&gt;
&lt;br /&gt;
[[File:AddingFmodEffect.png]]&lt;br /&gt;
&lt;br /&gt;
Right-click on the knob that you want to be dynamically controlled, and select &amp;quot;Add Automation&amp;quot;. Your should now see a track for that setting in the track deck.&lt;br /&gt;
&lt;br /&gt;
In the new tab for your parameter, add you desired control points to determine how the setting is changed based on the parameter. There is a scale above the tracks showing the range of your parameter, and above that is a knob for your parameter to test how different values sound. you can also set a default value by right clicking on your parameter knob.&lt;br /&gt;
&lt;br /&gt;
[[File:ParameterTabExample.png]]&lt;br /&gt;
&lt;br /&gt;
==Controlling the parameter in your mod scripts==&lt;br /&gt;
&lt;br /&gt;
You will need to use you own sValue parameter rather than the standard ones. For example: If you want to have a dynamic shoot sound, do not use the &amp;quot;shoot-snd&amp;quot; parameter because this used by the base projectile classes and would be difficult to alter how it is controlled.&lt;br /&gt;
&lt;br /&gt;
BAD:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;string name=&amp;quot;shoot-snd&amp;quot;&amp;gt;{5567e7f1-bf44-420c-a7b8-fc8c1ee2f628}&amp;lt;/string&amp;gt;&lt;br /&gt;
&lt;br /&gt;
GOOD:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;string name=&amp;quot;custom-shoot-snd&amp;quot;&amp;gt;{5567e7f1-bf44-420c-a7b8-fc8c1ee2f628}&amp;lt;/string&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Continuing with the dynamic shoot sound example, you would need to have a custom projectile script that extends the desired type of projectile. Load in your sound sVal parameter, override the Initialize method, call the base class' Initialize method, then play your sound by calling PlaySound3D with a dictionary of your parameter:&lt;br /&gt;
&lt;br /&gt;
 class DynamicSoundBeam : BeamProjectile&lt;br /&gt;
 {&lt;br /&gt;
 	SoundEvent@ customShootSound;&lt;br /&gt;
 	&lt;br /&gt;
 	DynamicSoundBeam(UnitPtr unit, SValue&amp;amp; params)&lt;br /&gt;
 	{&lt;br /&gt;
 		super(unit, params);&lt;br /&gt;
 		&lt;br /&gt;
 		@customShootSound = Resources::GetSoundEvent(GetParamString(unit, params, &amp;quot;custom-shoot-snd&amp;quot;, false));&lt;br /&gt;
 	}&lt;br /&gt;
 	&lt;br /&gt;
 	void Initialize(Actor@ owner, vec2 dir, float intensity, bool husk, Actor@ target, uint weapon) override&lt;br /&gt;
 	{&lt;br /&gt;
 		BeamProjectile::Initialize(owner, dir, intensity, husk, target, weapon);&lt;br /&gt;
 		&lt;br /&gt;
 		m_pos = xy(m_unit.GetPosition());&lt;br /&gt;
 &lt;br /&gt;
 		float paramValue = 0.7 // &amp;lt;---- your beautiful dynamic parameter logic here&lt;br /&gt;
 &lt;br /&gt;
 		dictionary params = { { &amp;quot;MyParameter&amp;quot;, paramValue } };&lt;br /&gt;
 		PlaySound3D(customShootSound, m_unit.GetPosition(), params);	&lt;br /&gt;
 	}&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==Controlling an on-going sound==&lt;br /&gt;
It is also possible to control an FMOD parameter while the sound is playing. Instead of using PlaySound3D, you can call PlayTracked directly on your SoundEvent which will return a SoundInstance. With a reference to the SoundInstance you can execute more control over how the sound plays out. See the [https://docs.heroesofhammerwatch.com/engine/class_sound_instance.html SoundInstance] documentation for all the options. Then you can alter the sound instance as you please in an update method:&lt;br /&gt;
&lt;br /&gt;
 class DynamicSoundBeam : BeamProjectile&lt;br /&gt;
 {&lt;br /&gt;
 	SoundEvent@ customShootSound;&lt;br /&gt;
 	SoundInstance@ = myCustomSoundInstance;&lt;br /&gt;
 	&lt;br /&gt;
 	DynamicSoundBeam(UnitPtr unit, SValue&amp;amp; params)&lt;br /&gt;
 	{&lt;br /&gt;
 		super(unit, params);&lt;br /&gt;
 		&lt;br /&gt;
 		@customShootSound = Resources::GetSoundEvent(GetParamString(unit, params, &amp;quot;custom-shoot-snd&amp;quot;, false));&lt;br /&gt;
 	}&lt;br /&gt;
 	&lt;br /&gt;
 	void Initialize(Actor@ owner, vec2 dir, float intensity, bool husk, Actor@ target, uint weapon) override&lt;br /&gt;
 	{&lt;br /&gt;
 		BeamProjectile::Initialize(owner, dir, intensity, husk, target, weapon);&lt;br /&gt;
 		&lt;br /&gt;
 		@myCustomSoundInstance = customShootSound.PlayTracked(m_unit.GetPosition());&lt;br /&gt;
 	}&lt;br /&gt;
 	&lt;br /&gt;
 	void Update(int dt) override&lt;br /&gt;
 	{&lt;br /&gt;
 		BeamProjectile::Update(dt);&lt;br /&gt;
 		&lt;br /&gt;
 		float param = 0.7 // &amp;lt;--- you got this, champ.&lt;br /&gt;
 		&lt;br /&gt;
 		myCustomSoundInstance.SetPosition(m_unit.GetPosition());&lt;br /&gt;
 		myCustomSoundInstance.SetParameter(&amp;quot;myParameter&amp;quot;, param);&lt;br /&gt;
 	{&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Template:BaseNav}}&lt;/div&gt;</summary>
		<author><name>The Slad</name></author>
	</entry>
	<entry>
		<id>https://wiki.heroesofhammerwatch.com/index.php?title=Creating_dynamic_sounds_with_FMOD&amp;diff=2395</id>
		<title>Creating dynamic sounds with FMOD</title>
		<link rel="alternate" type="text/html" href="https://wiki.heroesofhammerwatch.com/index.php?title=Creating_dynamic_sounds_with_FMOD&amp;diff=2395"/>
		<updated>2020-11-07T04:33:49Z</updated>

		<summary type="html">&lt;p&gt;The Slad: /* Controlling an on-going sound */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;It is possible to create dynamic sounds and music for you mod using parameters in FMOD.&lt;br /&gt;
&lt;br /&gt;
This page assumes you already have FMOD set up for you Heroes of Hammerwatch mod. See [[Adding custom sounds and music]] for more information.&lt;br /&gt;
&lt;br /&gt;
==Adding a parameter to your sound event in FMOD==&lt;br /&gt;
Open your event in FMOD use the &amp;quot;+&amp;quot; tab above the tracks to add a new parameter.&lt;br /&gt;
&lt;br /&gt;
[[File:AddingFmodParameter.png]]&lt;br /&gt;
&lt;br /&gt;
If you haven't created the effect that you want to be dynamic, go ahead and do that now.&lt;br /&gt;
&lt;br /&gt;
[[File:AddingFmodEffect.png]]&lt;br /&gt;
&lt;br /&gt;
Right-click on the knob that you want to be dynamically controlled, and select &amp;quot;Add Automation&amp;quot;. Your should now see a track for that setting in the track deck.&lt;br /&gt;
&lt;br /&gt;
In the new tab for your parameter, add you desired control points to determine how the setting is changed based on the parameter. There is a scale above the tracks showing the range of your parameter, and above that is a knob for your parameter to test how different values sound. you can also set a default value by right clicking on your parameter knob.&lt;br /&gt;
&lt;br /&gt;
[[File:ParameterTabExample.png]]&lt;br /&gt;
&lt;br /&gt;
==Controlling the parameter in your mod scripts==&lt;br /&gt;
&lt;br /&gt;
You will need to use you own sValue parameter rather than the standard ones. For example: If you want to have a dynamic shoot sound, do not use the &amp;quot;shoot-snd&amp;quot; parameter because this used by the base projectile classes and would be difficult to alter how it is controlled.&lt;br /&gt;
&lt;br /&gt;
BAD:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;string name=&amp;quot;shoot-snd&amp;quot;&amp;gt;{5567e7f1-bf44-420c-a7b8-fc8c1ee2f628}&amp;lt;/string&amp;gt;&lt;br /&gt;
&lt;br /&gt;
GOOD:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;string name=&amp;quot;custom-shoot-snd&amp;quot;&amp;gt;{5567e7f1-bf44-420c-a7b8-fc8c1ee2f628}&amp;lt;/string&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Continuing with the dynamic shoot sound example, you would need to have a custom projectile script that extends the desired type of projectile. Load in your sound sVal parameter, override the Initialize method, call the base class' Initialize method, then play your sound by calling PlaySound3D with a dictionary of your parameter:&lt;br /&gt;
&lt;br /&gt;
 class DynamicSoundBeam : BeamProjectile&lt;br /&gt;
 {&lt;br /&gt;
 	SoundEvent@ customShootSound;&lt;br /&gt;
 	&lt;br /&gt;
 	DynamicSoundBeam(UnitPtr unit, SValue&amp;amp; params)&lt;br /&gt;
 	{&lt;br /&gt;
 		super(unit, params);&lt;br /&gt;
 		&lt;br /&gt;
 		@customShootSound = Resources::GetSoundEvent(GetParamString(unit, params, &amp;quot;custom-shoot-snd&amp;quot;, false));&lt;br /&gt;
 	}&lt;br /&gt;
 	&lt;br /&gt;
 	void Initialize(Actor@ owner, vec2 dir, float intensity, bool husk, Actor@ target, uint weapon) override&lt;br /&gt;
 	{&lt;br /&gt;
 		BeamProjectile::Initialize(owner, dir, intensity, husk, target, weapon);&lt;br /&gt;
 		&lt;br /&gt;
 		m_pos = xy(m_unit.GetPosition());&lt;br /&gt;
 &lt;br /&gt;
 		float paramValue = 0.7 // &amp;lt;---- your beautiful dynamic parameter logic here&lt;br /&gt;
 &lt;br /&gt;
 		dictionary params = { { &amp;quot;MyParameter&amp;quot;, paramValue } };&lt;br /&gt;
 		PlaySound3D(customShootSound, m_unit.GetPosition(), params);	&lt;br /&gt;
 	}&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==Controlling an on-going sound==&lt;br /&gt;
It is also possible to control an FMOD parameter while the sound is playing. Instead of using PlaySound3D, you can call PlayTracked directly on your SoundEvent which will return a SoundInstance. With a reference to the SoundInstance you can execute more control over how the sound plays out. See the [https://docs.heroesofhammerwatch.com/engine/class_sound_instance.html SoundInstance] documentation for all the options. Then you can alter the sound instance as you please in an update method:&lt;br /&gt;
&lt;br /&gt;
 class DynamicSoundBeam : BeamProjectile&lt;br /&gt;
 {&lt;br /&gt;
 	SoundEvent@ customShootSound;&lt;br /&gt;
 	SoundInstance@ = myCustomSoundInstance;&lt;br /&gt;
 	&lt;br /&gt;
 	DynamicSoundBeam(UnitPtr unit, SValue&amp;amp; params)&lt;br /&gt;
 	{&lt;br /&gt;
 		super(unit, params);&lt;br /&gt;
 		&lt;br /&gt;
 		@customShootSound = Resources::GetSoundEvent(GetParamString(unit, params, &amp;quot;custom-shoot-snd&amp;quot;, false));&lt;br /&gt;
 	}&lt;br /&gt;
 	&lt;br /&gt;
 	void Initialize(Actor@ owner, vec2 dir, float intensity, bool husk, Actor@ target, uint weapon) override&lt;br /&gt;
 	{&lt;br /&gt;
 		BeamProjectile::Initialize(owner, dir, intensity, husk, target, weapon);&lt;br /&gt;
 		&lt;br /&gt;
 		@myCustomSoundInstance = customShootSound.PlayTracked(m_unit.GetPosition());&lt;br /&gt;
 	}&lt;br /&gt;
 	&lt;br /&gt;
 	void Update(int dt) override&lt;br /&gt;
 	{&lt;br /&gt;
 		BeamProjectile::Update(dt);&lt;br /&gt;
 		&lt;br /&gt;
 		float param = 0.7 // &amp;lt;--- you got this, champ.&lt;br /&gt;
 		&lt;br /&gt;
 		myCustomSoundInstance.SetPosition(m_unit.GetPosition());&lt;br /&gt;
 		myCustomSoundInstance.SetParameter(&amp;quot;myParameter&amp;quot;, param);&lt;br /&gt;
 	{&lt;br /&gt;
 }&lt;/div&gt;</summary>
		<author><name>The Slad</name></author>
	</entry>
	<entry>
		<id>https://wiki.heroesofhammerwatch.com/index.php?title=Creating_dynamic_sounds_with_FMOD&amp;diff=2394</id>
		<title>Creating dynamic sounds with FMOD</title>
		<link rel="alternate" type="text/html" href="https://wiki.heroesofhammerwatch.com/index.php?title=Creating_dynamic_sounds_with_FMOD&amp;diff=2394"/>
		<updated>2020-11-07T04:18:24Z</updated>

		<summary type="html">&lt;p&gt;The Slad: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;It is possible to create dynamic sounds and music for you mod using parameters in FMOD.&lt;br /&gt;
&lt;br /&gt;
This page assumes you already have FMOD set up for you Heroes of Hammerwatch mod. See [[Adding custom sounds and music]] for more information.&lt;br /&gt;
&lt;br /&gt;
==Adding a parameter to your sound event in FMOD==&lt;br /&gt;
Open your event in FMOD use the &amp;quot;+&amp;quot; tab above the tracks to add a new parameter.&lt;br /&gt;
&lt;br /&gt;
[[File:AddingFmodParameter.png]]&lt;br /&gt;
&lt;br /&gt;
If you haven't created the effect that you want to be dynamic, go ahead and do that now.&lt;br /&gt;
&lt;br /&gt;
[[File:AddingFmodEffect.png]]&lt;br /&gt;
&lt;br /&gt;
Right-click on the knob that you want to be dynamically controlled, and select &amp;quot;Add Automation&amp;quot;. Your should now see a track for that setting in the track deck.&lt;br /&gt;
&lt;br /&gt;
In the new tab for your parameter, add you desired control points to determine how the setting is changed based on the parameter. There is a scale above the tracks showing the range of your parameter, and above that is a knob for your parameter to test how different values sound. you can also set a default value by right clicking on your parameter knob.&lt;br /&gt;
&lt;br /&gt;
[[File:ParameterTabExample.png]]&lt;br /&gt;
&lt;br /&gt;
==Controlling the parameter in your mod scripts==&lt;br /&gt;
&lt;br /&gt;
You will need to use you own sValue parameter rather than the standard ones. For example: If you want to have a dynamic shoot sound, do not use the &amp;quot;shoot-snd&amp;quot; parameter because this used by the base projectile classes and would be difficult to alter how it is controlled.&lt;br /&gt;
&lt;br /&gt;
BAD:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;string name=&amp;quot;shoot-snd&amp;quot;&amp;gt;{5567e7f1-bf44-420c-a7b8-fc8c1ee2f628}&amp;lt;/string&amp;gt;&lt;br /&gt;
&lt;br /&gt;
GOOD:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;string name=&amp;quot;custom-shoot-snd&amp;quot;&amp;gt;{5567e7f1-bf44-420c-a7b8-fc8c1ee2f628}&amp;lt;/string&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Continuing with the dynamic shoot sound example, you would need to have a custom projectile script that extends the desired type of projectile. Load in your sound sVal parameter, override the Initialize method, call the base class' Initialize method, then play your sound by calling PlaySound3D with a dictionary of your parameter:&lt;br /&gt;
&lt;br /&gt;
 class DynamicSoundBeam : BeamProjectile&lt;br /&gt;
 {&lt;br /&gt;
 	SoundEvent@ customShootSound;&lt;br /&gt;
 	&lt;br /&gt;
 	DynamicSoundBeam(UnitPtr unit, SValue&amp;amp; params)&lt;br /&gt;
 	{&lt;br /&gt;
 		super(unit, params);&lt;br /&gt;
 		&lt;br /&gt;
 		@customShootSound = Resources::GetSoundEvent(GetParamString(unit, params, &amp;quot;custom-shoot-snd&amp;quot;, false));&lt;br /&gt;
 	}&lt;br /&gt;
 	&lt;br /&gt;
 	void Initialize(Actor@ owner, vec2 dir, float intensity, bool husk, Actor@ target, uint weapon) override&lt;br /&gt;
 	{&lt;br /&gt;
 		BeamProjectile::Initialize(owner, dir, intensity, husk, target, weapon);&lt;br /&gt;
 		&lt;br /&gt;
 		m_pos = xy(m_unit.GetPosition());&lt;br /&gt;
 &lt;br /&gt;
 		float paramValue = 0.7 // &amp;lt;---- your beautiful dynamic parameter logic here&lt;br /&gt;
 &lt;br /&gt;
 		dictionary params = { { &amp;quot;MyParameter&amp;quot;, paramValue } };&lt;br /&gt;
 		PlaySound3D(customShootSound, m_unit.GetPosition(), params);	&lt;br /&gt;
 	}&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==Controlling an on-going sound==&lt;/div&gt;</summary>
		<author><name>The Slad</name></author>
	</entry>
	<entry>
		<id>https://wiki.heroesofhammerwatch.com/index.php?title=Creating_dynamic_sounds_with_FMOD&amp;diff=2393</id>
		<title>Creating dynamic sounds with FMOD</title>
		<link rel="alternate" type="text/html" href="https://wiki.heroesofhammerwatch.com/index.php?title=Creating_dynamic_sounds_with_FMOD&amp;diff=2393"/>
		<updated>2020-11-07T04:17:27Z</updated>

		<summary type="html">&lt;p&gt;The Slad: /* Controlling the parameter in your mod scripts */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;It is possible to create dynamic sounds and music for you mod using parameters in FMOD.&lt;br /&gt;
&lt;br /&gt;
This page assumes you already have FMOD set up for you Heroes of Hammerwatch mod. See [[Adding custom sounds and music]] for more information.&lt;br /&gt;
&lt;br /&gt;
==Adding a parameter to your sound event in FMOD==&lt;br /&gt;
Open your event in FMOD use the &amp;quot;+&amp;quot; tab above the tracks to add a new parameter.&lt;br /&gt;
&lt;br /&gt;
[[File:AddingFmodParameter.png]]&lt;br /&gt;
&lt;br /&gt;
If you haven't created the effect that you want to be dynamic, go ahead and do that now.&lt;br /&gt;
&lt;br /&gt;
[[File:AddingFmodEffect.png]]&lt;br /&gt;
&lt;br /&gt;
Right-click on the knob that you want to be dynamically controlled, and select &amp;quot;Add Automation&amp;quot;. Your should now see a track for that setting in the track deck.&lt;br /&gt;
&lt;br /&gt;
In the new tab for your parameter, add you desired control points to determine how the setting is changed based on the parameter. There is a scale above the tracks showing the range of your parameter, and above that is a knob for your parameter to test how different values sound. you can also set a default value by right clicking on your parameter knob.&lt;br /&gt;
&lt;br /&gt;
[[File:ParameterTabExample.png]]&lt;br /&gt;
&lt;br /&gt;
==Controlling the parameter in your mod scripts==&lt;br /&gt;
&lt;br /&gt;
You will need to use you own sValue parameter rather than the standard ones. For example: If you want to have a dynamic shoot sound, do not use the &amp;quot;shoot-snd&amp;quot; parameter because this used by the base projectile classes and would be difficult to alter how it is controlled.&lt;br /&gt;
&lt;br /&gt;
BAD:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;string name=&amp;quot;shoot-snd&amp;quot;&amp;gt;{5567e7f1-bf44-420c-a7b8-fc8c1ee2f628}&amp;lt;/string&amp;gt;&lt;br /&gt;
&lt;br /&gt;
GOOD:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;string name=&amp;quot;custom-shoot-snd&amp;quot;&amp;gt;{5567e7f1-bf44-420c-a7b8-fc8c1ee2f628}&amp;lt;/string&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Continuing with the dynamic shoot sound example, you would need to have a custom projectile script that extends the desired type of projectile. Load in your sound sVal parameter, override the Initialize method, call the base class' Initialize method, then play your sound by calling PlaySound3D with a dictionary of your parameter:&lt;br /&gt;
&lt;br /&gt;
 class DynamicSoundBeam : BeamProjectile&lt;br /&gt;
 {&lt;br /&gt;
 	SoundEvent@ customShootSound;&lt;br /&gt;
 	&lt;br /&gt;
 	DynamicSoundBeam(UnitPtr unit, SValue&amp;amp; params)&lt;br /&gt;
 	{&lt;br /&gt;
 		super(unit, params);&lt;br /&gt;
 		&lt;br /&gt;
 		@customShootSound = Resources::GetSoundEvent(GetParamString(unit, params, &amp;quot;custom-shoot-snd&amp;quot;, false));&lt;br /&gt;
 	}&lt;br /&gt;
 	&lt;br /&gt;
 	void Initialize(Actor@ owner, vec2 dir, float intensity, bool husk, Actor@ target, uint weapon) override&lt;br /&gt;
 	{&lt;br /&gt;
 		BeamProjectile::Initialize(owner, dir, intensity, husk, target, weapon);&lt;br /&gt;
 		&lt;br /&gt;
 		m_pos = xy(m_unit.GetPosition());&lt;br /&gt;
 &lt;br /&gt;
 		float paramValue = 0.7 // &amp;lt;---- your beautiful dynamic parameter logic here&lt;br /&gt;
 &lt;br /&gt;
 		dictionary params = { { &amp;quot;MyParameter&amp;quot;, paramValue } };&lt;br /&gt;
 		PlaySound3D(customShootSound, m_unit.GetPosition(), params);	&lt;br /&gt;
 	}&lt;br /&gt;
 }&lt;/div&gt;</summary>
		<author><name>The Slad</name></author>
	</entry>
	<entry>
		<id>https://wiki.heroesofhammerwatch.com/index.php?title=Creating_dynamic_sounds_with_FMOD&amp;diff=2392</id>
		<title>Creating dynamic sounds with FMOD</title>
		<link rel="alternate" type="text/html" href="https://wiki.heroesofhammerwatch.com/index.php?title=Creating_dynamic_sounds_with_FMOD&amp;diff=2392"/>
		<updated>2020-11-07T03:47:13Z</updated>

		<summary type="html">&lt;p&gt;The Slad: page created.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;It is possible to create dynamic sounds and music for you mod using parameters in FMOD.&lt;br /&gt;
&lt;br /&gt;
This page assumes you already have FMOD set up for you Heroes of Hammerwatch mod. See [[Adding custom sounds and music]] for more information.&lt;br /&gt;
&lt;br /&gt;
==Adding a parameter to your sound event in FMOD==&lt;br /&gt;
Open your event in FMOD use the &amp;quot;+&amp;quot; tab above the tracks to add a new parameter.&lt;br /&gt;
&lt;br /&gt;
[[File:AddingFmodParameter.png]]&lt;br /&gt;
&lt;br /&gt;
If you haven't created the effect that you want to be dynamic, go ahead and do that now.&lt;br /&gt;
&lt;br /&gt;
[[File:AddingFmodEffect.png]]&lt;br /&gt;
&lt;br /&gt;
Right-click on the knob that you want to be dynamically controlled, and select &amp;quot;Add Automation&amp;quot;. Your should now see a track for that setting in the track deck.&lt;br /&gt;
&lt;br /&gt;
In the new tab for your parameter, add you desired control points to determine how the setting is changed based on the parameter. There is a scale above the tracks showing the range of your parameter, and above that is a knob for your parameter to test how different values sound. you can also set a default value by right clicking on your parameter knob.&lt;br /&gt;
&lt;br /&gt;
[[File:ParameterTabExample.png]]&lt;br /&gt;
&lt;br /&gt;
==Controlling the parameter in your mod scripts==&lt;br /&gt;
&lt;br /&gt;
WIP hold on getting some code example goin'.&lt;/div&gt;</summary>
		<author><name>The Slad</name></author>
	</entry>
	<entry>
		<id>https://wiki.heroesofhammerwatch.com/index.php?title=File:ParameterTabExample.png&amp;diff=2391</id>
		<title>File:ParameterTabExample.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.heroesofhammerwatch.com/index.php?title=File:ParameterTabExample.png&amp;diff=2391"/>
		<updated>2020-11-07T03:42:16Z</updated>

		<summary type="html">&lt;p&gt;The Slad: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>The Slad</name></author>
	</entry>
	<entry>
		<id>https://wiki.heroesofhammerwatch.com/index.php?title=File:AddingFmodEffect.png&amp;diff=2390</id>
		<title>File:AddingFmodEffect.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.heroesofhammerwatch.com/index.php?title=File:AddingFmodEffect.png&amp;diff=2390"/>
		<updated>2020-11-07T03:33:45Z</updated>

		<summary type="html">&lt;p&gt;The Slad: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>The Slad</name></author>
	</entry>
	<entry>
		<id>https://wiki.heroesofhammerwatch.com/index.php?title=File:AddingFmodParameter.png&amp;diff=2389</id>
		<title>File:AddingFmodParameter.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.heroesofhammerwatch.com/index.php?title=File:AddingFmodParameter.png&amp;diff=2389"/>
		<updated>2020-11-07T03:27:28Z</updated>

		<summary type="html">&lt;p&gt;The Slad: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>The Slad</name></author>
	</entry>
</feed>