# Some Help To understand this sintax GetParameterValue

**URL:** <https://qa.fmod.com/t/some-help-to-understand-this-sintax-getparametervalue/13028>\
**Category:** Unity\
**Created:** [March 10, 2017, 7:44pm UTC](https://qa.fmod.com/t/some-help-to-understand-this-sintax-getparametervalue/13028 "2017-03-10T19:44:24Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![DDAUDIOSOLUTIONS](https://avatars.discourse-cdn.com/v4/letter/d/58f4c7/32.png) [@DDAUDIOSOLUTIONS](https://qa.fmod.com/u/DDAUDIOSOLUTIONS)\
**Post date:** [March 10, 2017, 7:44pm UTC](https://qa.fmod.com/t/some-help-to-understand-this-sintax-getparametervalue/13028/1 "2017-03-10T19:44:24Z")

</div>

Hi, i try to use this:

Studio::EventInstance::getParameterValue

But i don’t understant how to input the values, because i understant that not should to use numerical values, if not, som variables. but i can not do it works.

help please.

the documentation say:

RESULT Studio.EventInstance.getParameterValue(  
string name,  
out float value,  
out float finalvalue  
);

Parameters

name  
Name of the parameter (case-insensitive).  
value  
Address of a variable to receive the value as set from the public API. Specify 0 or NULL to ignore.  
finalvalue  
Address of a variable to receive the final combined value. Specify 0 or NULL to ignore.

OK, i put my code line example:

void OnTriggerEnter (Collider hit){

```
	//float parametro3 = MusicaC.mcaparam.setValue (0.1f);
	//float parametro4 = MusicaC.mcaparam.setValue (0.12);

	if (hit.GetComponent<Collider> ().CompareTag ("Player")){ //check if the GameObject is the "PLayer"

		//MusicaC.M_Pipes.getParameterValue ("MUSIC", out parametro3, out parametro4); // Check if the parameter "MUSIC" is using paramValue 0f, and in this case change to 0.56f
	}
}

```

and i want to know how can i say to the line, which is the number of parametero3 and parametro4, becuase need that the new triggerEnter, play one or other sound in function of this values.

like Cameron try to make my understand, but i am a litte dummy

[http://www.fmod.org/questions/question/choose-parametervalue-with-conditionals/](http://www.fmod.org/questions/question/choose-parametervalue-with-conditionals/)

thanks for your help!!

---

<div class="post-metadata">

**Author:** ![Shark4](https://avatars.discourse-cdn.com/v4/letter/s/ed8c4c/32.png) [@Shark4](https://qa.fmod.com/u/Shark4)\
**Post date:** [March 15, 2017, 2:24pm UTC](https://qa.fmod.com/t/some-help-to-understand-this-sintax-getparametervalue/13028/2 "2017-03-15T14:24:31Z")

</div>

To set parameter check the documentation here : [http://www.fmod.org/documentation/#content/generated/engine\_new\_unity/script\_example\_basic.html](http://www.fmod.org/documentation/#content/generated/engine_new_unity/script_example_basic.html)

The number 9 talk about it.  
//--------------------------------------------------------------------  
// 9: This shows how to update a parameter of an instance every frame  
//--------------------------------------------------------------------  
playerState.setParameterValue(“health”, (float)health);

To my understanding, (I didn’t play with the getParameterValue yet), the out float value is the new value of that parameter and the finalValue will hold the result. I would personally hold the variable directly in Unity to do the logic and when I’m satisfied push the new value with setParameterValue.
