# Parameters changes not affecting transitions

**URL:** https://qa.fmod.com/t/parameters-changes-not-affecting-transitions/14172
**Category:** FMOD Studio
**Created:** [November 2, 2018, 7:35am UTC](https://qa.fmod.com/t/parameters-changes-not-affecting-transitions/14172 "2018-11-02T07:35:15Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![SonicBDP](https://avatars.discourse-cdn.com/v4/letter/s/c0e974/32.png) [@SonicBDP](https://qa.fmod.com/u/SonicBDP)
#### Post date: [November 2, 2018, 7:35am UTC](https://qa.fmod.com/t/parameters-changes-not-affecting-transitions/14172/1 "2018-11-02T07:35:15Z")

</div>

I’ve been working on a 3-part spell sound (start, loop, end) and the transitions work properly in Studio when played individually (set the parameter in studio, play, stop, set parameter, play), but real-time changes to the parameter do not affect whether my loop continues or not. I’m unsure if this is a bug or if I’ve set my transitions up incorrectly.

[https://imgur.com/KiWqU95](https://imgur.com/KiWqU95)

I’m also encountering a related problem with my code to control this in Unity. It appears that my parameter change is not being recognized by FMOD according to a Profiler session I recorded. I have tried using both the setParameterValue and setValue commands, but neither work (and setValue is giving me a “‘FMOD.Studio.ParameterInstance’ does not contain a definition for ‘setValue’” error).

```auto
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using FMODUnity;

public class PlaySound : MonoBehaviour {

	[FMODUnity.EventRef] 								
	public string ZonePath; 
	public FMOD.Studio.EventInstance ZoneEvent;
	public FMOD.Studio.ParameterInstance ZonePI;
	public float SpellPH = 0f;
	
	void Start () {
        ZoneEvent = FMODUnity.RuntimeManager.CreateInstance(ZonePath);
        
    }
	
	void Update () {
		if (Input.GetKeyDown(KeyCode.Return))
		{
			ZoneEvent.start();
            ZoneEvent.getParameter("SpellPhase", out ZonePI);
        }
		else if (Input.GetKeyDown(KeyCode.RightShift))
		{
			ZoneEvent.stop(FMOD.Studio.STOP_MODE.ALLOWFADEOUT);
		}
		
		if (Input.GetKeyDown(KeyCode.KeypadPlus) && (SpellPH <3))
		{
            SpellPH += 1f;
            ZonePI.setParameterValue(SpellPH);
        }
		else if (Input.GetKeyDown(KeyCode.KeypadMinus) && (SpellPH>1))
		{
			SpellPH -= 1f;
            ZonePI.setParameterValue(SpellPH);
        }
        
    }
```

I just have this script attached to the same “empty object” that my ambiance emitter is attached to.

---

<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: [November 6, 2018, 10:42pm UTC](https://qa.fmod.com/t/parameters-changes-not-affecting-transitions/14172/2 "2018-11-06T22:42:45Z")

</div>

FMOD.Studio.ParameterInstance does contain a definition for setValue, but it does not have setParameterValue as that is in the FMOD.Studio.EventInstance.

Nothing else immediately stands out as a problem, all the FMOD functions return an FMOD.RESULT which may help with debugging.
