# Velocity feature on parameters, need confirmation of function

**URL:** <https://qa.fmod.com/t/velocity-feature-on-parameters-need-confirmation-of-function/18554>\
**Category:** FMOD Studio\
**Tags:** unity\
**Created:** [March 21, 2022, 4:41pm UTC](https://qa.fmod.com/t/velocity-feature-on-parameters-need-confirmation-of-function/18554 "2022-03-21T16:41:29Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Inkfish](https://avatars.discourse-cdn.com/v4/letter/i/f19dbf/32.png) [@Inkfish](https://qa.fmod.com/u/Inkfish)\
**Post date:** [March 21, 2022, 4:41pm UTC](https://qa.fmod.com/t/velocity-feature-on-parameters-need-confirmation-of-function/18554/1 "2022-03-21T16:41:29Z")

</div>

Hi All, i think the velocity feature is not behaving as expected but need confirmation.

I am using a parameter called FirstBlood with a veolcity set at 0.35/s. There are 3 states 0,1 and Q. My understanding on how this should work is the paramemter remains on 0 until the parameter is called (when any ship takes damage) and will then set to 1, and again automatically move to Q after X seconds once my score is quantized.

 ![FMOD_Studio_EpJtIF250y](https://canada1.discourse-cdn.com/flex036/uploads/fmod/original/2X/a/a101b43b0b0c3a6e0506425aace1c527d3d86f2b.png)

However the parameter is moving between states before any such call at the start of each battle. Is this the correct behaviour? Should it not stay on 0?

For completeness: i use the Q state to disable my magnet region (highlighted above) after quantization. If you know of another way to do this, i’m all ears! Thanks

 ![FMOD_Studio_rhH9H8H72W](https://canada1.discourse-cdn.com/flex036/uploads/fmod/original/2X/1/1d2ca6a7796298ce5b9259cbda4f26ba866f93a4.png)

---

<div class="post-metadata">

**Author:** ![joseph](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/joseph/32/264_2.png) [@joseph](https://qa.fmod.com/u/joseph)\
**Post date:** [March 22, 2022, 12:11am UTC](https://qa.fmod.com/t/velocity-feature-on-parameters-need-confirmation-of-function/18554/2 "2022-03-22T00:11:41Z")

</div>

> [@Inkfish](#):
>
> However the parameter is moving between states before any such call at the start of each battle. Is this the correct behaviour?

Yes, this is correct behavior. A local parameter with velocity continually increases or decreases in value whenever the event is playing and not paused.

Your parameter’s initial value is 0, and its velocity is 0.35. This means it will begin increasing from its initial value of 0 as soon as the event starts playing.

> [@Inkfish](#):
>
> i use the Q state to disable my magnet region (highlighted above) after quantization. If you know of another way to do this, i’m all ears!

Why not set the parameter’s initial value to Q? That way, the magnet region won’t be active until something sets the parameter’s value to 1, at which point it will be active for the short period of time it takes for the parameter’s velocity to increase its value back to Q.

---

<div class="post-metadata">

**Author:** ![Inkfish](https://avatars.discourse-cdn.com/v4/letter/i/f19dbf/32.png) [@Inkfish](https://qa.fmod.com/u/Inkfish)\
**Post date:** [March 24, 2022, 6:51pm UTC](https://qa.fmod.com/t/velocity-feature-on-parameters-need-confirmation-of-function/18554/3 "2022-03-24T18:51:08Z")

</div>

> Why not set the parameter’s initial value to Q?

Well, i have VO feedbacks when units die, that use FirstBlood parameter as a trigger condition (acts like a mute in the period between battles where Unity is resetting parameters).

> That way, the magnet region won’t be active until something sets the parameter’s value to 1

I’m using a master Composer instrument which has all the various scores nested within it. So my GenericBattle score instrument that contains FirstBlood parameter sheet is always triggered immediately. I don’t think i can use velocity in my setup.

I’m investgating some workarounds and will update! thanks

---

<div class="post-metadata">

**Author:** ![Alcibiade](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/alcibiade/32/4284_2.png) [@Alcibiade](https://qa.fmod.com/u/Alcibiade)\
**Post date:** [March 24, 2022, 9:59pm UTC](https://qa.fmod.com/t/velocity-feature-on-parameters-need-confirmation-of-function/18554/4 "2022-03-24T21:59:23Z")

</div>

Indeed, velocity is a bad choice in your case, and it’s quite weird to use that feature with a labelled parameter (as opposed to continuous).  
Maybe the simplest solution that would come to my mind is to call, every time you need, a special event “Recover”, which could look like this:

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/fmod/original/2X/e/e89dbfdd88efa9d6cb884f90d07404cd2dfb8d83.png)  
The silence instrument sets the delay, the command instrument sets the parameter to the value you want.

---

<div class="post-metadata">

**Author:** ![joseph](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/joseph/32/264_2.png) [@joseph](https://qa.fmod.com/u/joseph)\
**Post date:** [March 24, 2022, 11:30pm UTC](https://qa.fmod.com/t/velocity-feature-on-parameters-need-confirmation-of-function/18554/5 "2022-03-24T23:30:28Z")

</div>

> [@Inkfish](#):
>
> I’m investgating some workarounds and will update!

As Alcibiade says, it sounds like velocity is not the tool that you want.

> [@Alcibiade](#):
>
> Maybe the simplest solution that would come to my mind is to call, every time you need, a special event “Recover”, which could look like this:

While a separate event would work, I suspect it would be easier to instead place a multi instrument at position 1 on the parameter. This multi instrument should be set to “sequential - local scope” with a play count of 2, and its playlist should contain a silence instrument and a command instrument (much like Alcibiade’s action sheet). The result should be that it is triggered whenever the parameter’s value is set to 1, and automatically changes that parameter’s value to Q a specific amount of time later.

---

<div class="post-metadata">

**Author:** ![Inkfish](https://avatars.discourse-cdn.com/v4/letter/i/f19dbf/32.png) [@Inkfish](https://qa.fmod.com/u/Inkfish)\
**Post date:** [March 25, 2022, 5:19am UTC](https://qa.fmod.com/t/velocity-feature-on-parameters-need-confirmation-of-function/18554/6 "2022-03-25T05:19:07Z")

</div>

That is GENIUS! Both of you. I would have never thought of that. I will try this today.

I sort of half managed to solve the problem by making a discrete parameter that can hold 3 values. And then use a command instrument to increment it in the magnets transition timeline of 8 bars as quickly as possible.

This has undesired results however, as I am using the magnet in relative mode, so I can’t increment the value until the very end of the 8th bar for fear of skipping the command instrument

I will try both ways and report back the best for my use case. Thanks!

---

<div class="post-metadata">

**Author:** ![Alcibiade](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/alcibiade/32/4284_2.png) [@Alcibiade](https://qa.fmod.com/u/Alcibiade)\
**Post date:** [March 25, 2022, 10:15am UTC](https://qa.fmod.com/t/velocity-feature-on-parameters-need-confirmation-of-function/18554/7 "2022-03-25T10:15:36Z")

</div>

Joseph’s multi-instrument is the simplest solution. Mine (with a distinct event) will be best fitted if you meant to reuse it in several events.
