0
0

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/

thanks for your help!!

  • You must to post comments
0
0

To set parameter check the documentation here : 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.

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.