# How do you link Event parameters to specific in-game events in Unity?

**URL:** <https://qa.fmod.com/t/how-do-you-link-event-parameters-to-specific-in-game-events-in-unity/12765>\
**Category:** Unity\
**Created:** [October 22, 2016, 11:55pm UTC](https://qa.fmod.com/t/how-do-you-link-event-parameters-to-specific-in-game-events-in-unity/12765 "2016-10-22T23:55:11Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![pekena.larva](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/pekena.larva/32/134_2.png) [@pekena.larva](https://qa.fmod.com/u/pekena.larva)\
**Post date:** [October 22, 2016, 11:55pm UTC](https://qa.fmod.com/t/how-do-you-link-event-parameters-to-specific-in-game-events-in-unity/12765/1 "2016-10-22T23:55:11Z")

</div>

Hi, I’ve made an interactive musical structure for a short score I’ve wrote for a VR horror minigame. It has several parameters that dictate when it should do a transition to a new section. I recorded this video so you can understand better how I’m building everything:

[FMOD INTERACTIVE MUSIC STRUCTURE EXAMPLE VIDEO](https://youtu.be/cZGppTyKhyI)

As you can see, I’ve basically created a parameter for each in-game event that leads to a new music loop. Aditionaly there’s a parameter that changes the music based in how close is an enemy to the player. How should we connect each parameter to their specific in-game event? All I got inside the Studio Event Emitter in Unity is this ! [http://icecream.me/3faab0b086efe6c0471ed4472f7df062](http://icecream.me/3faab0b086efe6c0471ed4472f7df062) and I don’t see any way to assign each Event parameter independently. I suppose we need to code something, but I’m not the programmer. As for the programmer, he never worked with FMOD before, so we need some guidance. We’re a rookie team and we’re still learning how to use some tools.  
Thanks in advance.

---

<div class="post-metadata">

**Author:** ![cameron-fmod](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/cameron-fmod/32/261_2.png) [@cameron-fmod](https://qa.fmod.com/u/cameron-fmod)\
**Post date:** [October 28, 2016, 3:10am UTC](https://qa.fmod.com/t/how-do-you-link-event-parameters-to-specific-in-game-events-in-unity/12765/2 "2016-10-28T03:10:11Z")

</div>

Instead of having separate parameters for your Events, you could have just one, with a range (eg. 0 - 4), that can move to another depending on the value.

Then without any scripting yourself, in Unity you can add a FMOD Studio Parameter Trigger script which can be linked to a FMOD Studio Event Emitter in the scene and can change parameters that way.

Otherwise through script you can create a FMOD.Studio.ParameterInstance to store a reference to a specific parameter (as a float) that your programmer can then adjust as needed.

Check out the documentation, there is a fair bit of info and some examples too.  
[http://www.fmod.org/documentation/#content/generated/engine\_new\_unity/paramtrigger.html](http://www.fmod.org/documentation/#content/generated/engine_new_unity/paramtrigger.html)
