# FMOD Scripting

**URL:** <https://qa.fmod.com/t/fmod-scripting/13432>\
**Category:** Unity\
**Created:** [September 14, 2017, 7:26pm UTC](https://qa.fmod.com/t/fmod-scripting/13432 "2017-09-14T19:26:09Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mbmusicpl](https://avatars.discourse-cdn.com/v4/letter/m/51bf81/32.png) [@mbmusicpl](https://qa.fmod.com/u/mbmusicpl)\
**Post date:** [September 14, 2017, 7:26pm UTC](https://qa.fmod.com/t/fmod-scripting/13432/1 "2017-09-14T19:26:09Z")

</div>

Hi,

Could Someone help with script changing parametr attached to sprite ??

 ![](https://i.imgur.com/f90ixpX.png)

This is simple Drag and drop based on UI panels. What i want to do is to change parametr attached in “Violin” when droping on “violinslot”. Music will fade in and fade out when violin will be taken away.

I know that i should use EventTrigger Componet on panel  
[![](https://i.imgur.com/WTWmUHf.png) ](https://i.imgur.com/WTWmUHf.png)

---

<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:** [September 17, 2017, 11:17pm UTC](https://qa.fmod.com/t/fmod-scripting/13432/2 "2017-09-17T23:17:27Z")

</div>

If the violin is a separate event, you could add volume modulation in Studio to make it fade in and fade out instead of a parameter.

Otherwise if the violin is an instrument in an event you want to turn on and off, StudioEventEmitter has a SetParameter function that takes the name and value of the parameter you want to set.

---

<div class="post-metadata">

**Author:** ![mbmusicpl](https://avatars.discourse-cdn.com/v4/letter/m/51bf81/32.png) [@mbmusicpl](https://qa.fmod.com/u/mbmusicpl)\
**Post date:** [September 20, 2017, 11:18am UTC](https://qa.fmod.com/t/fmod-scripting/13432/3 "2017-09-20T11:18:09Z")

</div>

Hi thx Cameron  
Violin is a separate event. I want it to start playing with the game with 0 volume and change volume to 100 when put violin sprite in slot

[[Album] Imgur ![](https://i.imgur.com/DLvW2TJ.jpg?fb "Imgur") ](https://imgur.com/a/DxbMO)

[[Album] Imgur ![](https://i.imgur.com/Qc27gmJ.jpg?fb "Imgur") ](https://imgur.com/a/CujIq)

p.s  
collisions doesn’t work on UI Panels. We have to do it via Add Script–\> Event–\> Event trigger. thats why i need script or something else. I just dont know what should i do
